~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/package/debian/rules

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/package/debian/rules (Architecture sparc64) and /scripts/package/debian/rules (Architecture ppc)


  1 #!/usr/bin/make -f                                  1 #!/usr/bin/make -f
  2 # SPDX-License-Identifier: GPL-2.0-only             2 # SPDX-License-Identifier: GPL-2.0-only
  3                                                     3 
  4 # in case debian/rules is executed directly         4 # in case debian/rules is executed directly
  5 export DEB_RULES_REQUIRES_ROOT := no                5 export DEB_RULES_REQUIRES_ROOT := no
  6                                                     6 
  7 include debian/rules.vars                           7 include debian/rules.vars
  8                                                     8 
  9 ifneq (,$(filter-out parallel=1,$(filter paral      9 ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
 10     NUMJOBS = $(patsubst parallel=%,%,$(filter     10     NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 11     MAKEFLAGS += -j$(NUMJOBS)                      11     MAKEFLAGS += -j$(NUMJOBS)
 12 endif                                              12 endif
 13                                                    13 
 14 # When KBUILD_VERBOSE is undefined (presumably     14 # When KBUILD_VERBOSE is undefined (presumably you are directly working with
 15 # the debianized tree), show verbose logs unle     15 # the debianized tree), show verbose logs unless DEB_BUILD_OPTION=terse is set.
 16 ifeq ($(origin KBUILD_VERBOSE),undefined)          16 ifeq ($(origin KBUILD_VERBOSE),undefined)
 17     ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)     17     ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
 18         export KBUILD_VERBOSE := 1                 18         export KBUILD_VERBOSE := 1
 19     else                                           19     else
 20         Q := @                                     20         Q := @
 21     endif                                          21     endif
 22 endif                                              22 endif
 23                                                    23 
 24 revision = $(lastword $(subst -, ,$(shell dpkg     24 revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version)))
 25 CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_     25 CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-)
 26 make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNE     26 make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE))
 27                                                    27 
 28 binary-targets := $(addprefix binary-, image i     28 binary-targets := $(addprefix binary-, image image-dbg headers libc-dev)
 29                                                    29 
 30 all-packages = $(shell dh_listpackages)            30 all-packages = $(shell dh_listpackages)
 31 image-package = $(filter linux-image-% user-%,     31 image-package = $(filter linux-image-% user-%, $(filter-out %-dbg, $(all-packages)))
 32 image-dbg-package = $(filter %-dbg, $(all-pack     32 image-dbg-package = $(filter %-dbg, $(all-packages))
 33 libc-dev-package = $(filter linux-libc-dev, $(     33 libc-dev-package = $(filter linux-libc-dev, $(all-packages))
 34 headers-package = $(filter linux-headers-%, $(     34 headers-package = $(filter linux-headers-%, $(all-packages))
 35                                                    35 
 36 mk-files = $(patsubst binary-%,debian/%.files,     36 mk-files = $(patsubst binary-%,debian/%.files,$1)
 37 package = $($(@:binary-%=%-package))               37 package = $($(@:binary-%=%-package))
 38                                                    38 
 39 # DH_OPTION is an environment variable common      39 # DH_OPTION is an environment variable common for all debhelper commands.
 40 # We could 'export' it, but here it is passed      40 # We could 'export' it, but here it is passed from the command line to clarify
 41 # which package is being processed in the buil     41 # which package is being processed in the build log.
 42 DH_OPTIONS = -p$(package)                          42 DH_OPTIONS = -p$(package)
 43                                                    43 
 44 define binary                                      44 define binary
 45         $(Q)dh_testdir $(DH_OPTIONS)               45         $(Q)dh_testdir $(DH_OPTIONS)
 46         $(Q)dh_testroot $(DH_OPTIONS)              46         $(Q)dh_testroot $(DH_OPTIONS)
 47         $(Q)dh_prep $(DH_OPTIONS)                  47         $(Q)dh_prep $(DH_OPTIONS)
 48         $(Q)+$(MAKE) $(make-opts) run-command      48         $(Q)+$(MAKE) $(make-opts) run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb $(package)'
 49         $(Q)dh_installdocs $(DH_OPTIONS)           49         $(Q)dh_installdocs $(DH_OPTIONS)
 50         $(Q)dh_installchangelogs $(DH_OPTIONS)     50         $(Q)dh_installchangelogs $(DH_OPTIONS)
 51         $(Q)dh_compress $(DH_OPTIONS)              51         $(Q)dh_compress $(DH_OPTIONS)
 52         $(Q)dh_fixperms $(DH_OPTIONS)              52         $(Q)dh_fixperms $(DH_OPTIONS)
 53         $(Q)dh_gencontrol $(DH_OPTIONS) -- -f$     53         $(Q)dh_gencontrol $(DH_OPTIONS) -- -f$(call mk-files,$@)
 54         $(Q)dh_md5sums $(DH_OPTIONS)               54         $(Q)dh_md5sums $(DH_OPTIONS)
 55         $(Q)dh_builddeb $(DH_OPTIONS) -- $(add     55         $(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS))
 56 endef                                              56 endef
 57                                                    57 
 58 .PHONY: $(binary-targets)                          58 .PHONY: $(binary-targets)
 59 $(binary-targets): build-arch                      59 $(binary-targets): build-arch
 60         $(Q)truncate -s0 $(call mk-files,$@)       60         $(Q)truncate -s0 $(call mk-files,$@)
 61         $(if $(package),$(binary))                 61         $(if $(package),$(binary))
 62                                                    62 
 63 .PHONY: binary binary-indep binary-arch            63 .PHONY: binary binary-indep binary-arch
 64 binary: binary-arch binary-indep                   64 binary: binary-arch binary-indep
 65 binary-indep: build-indep                          65 binary-indep: build-indep
 66 binary-arch: $(binary-targets)                     66 binary-arch: $(binary-targets)
 67         $(Q)cat $(call mk-files,$^) > debian/f     67         $(Q)cat $(call mk-files,$^) > debian/files
 68                                                    68 
 69 .PHONY: build build-indep build-arch               69 .PHONY: build build-indep build-arch
 70 build: build-arch build-indep                      70 build: build-arch build-indep
 71 build-indep:                                       71 build-indep:
 72 build-arch:                                        72 build-arch:
 73         $(Q)$(MAKE) $(make-opts) olddefconfig      73         $(Q)$(MAKE) $(make-opts) olddefconfig
 74         $(Q)$(MAKE) $(make-opts) $(if $(filter     74         $(Q)$(MAKE) $(make-opts) $(if $(filter um,$(ARCH)),,headers) all
 75                                                    75 
 76 .PHONY: clean                                      76 .PHONY: clean
 77 clean:                                             77 clean:
 78         $(Q)dh_clean                               78         $(Q)dh_clean
 79         $(Q)rm -rf debian/deb-env.vars* debian     79         $(Q)rm -rf debian/deb-env.vars* debian/*.files
 80         $(Q)$(MAKE) ARCH=$(ARCH) clean             80         $(Q)$(MAKE) ARCH=$(ARCH) clean
 81                                                    81 
 82 # If DEB_HOST_ARCH is empty, it is likely that     82 # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed
 83 # directly. Run 'dpkg-architecture --print-set     83 # directly. Run 'dpkg-architecture --print-set --print-format=make' to
 84 # generate a makefile construct that exports a     84 # generate a makefile construct that exports all DEB_* variables.
 85 ifndef DEB_HOST_ARCH                               85 ifndef DEB_HOST_ARCH
 86 include debian/deb-env.vars                        86 include debian/deb-env.vars
 87                                                    87 
 88 debian/deb-env.vars:                               88 debian/deb-env.vars:
 89         $(Q)dpkg-architecture -a$$(cat debian/     89         $(Q)dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > $@.tmp
 90         $(Q)mv $@.tmp $@                           90         $(Q)mv $@.tmp $@
 91 endif                                              91 endif
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php