Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 SHELLscip-debian debian busybox 1:1.38.0-3 busybox/rules/SHELL. = /bin/sh -e
3
4 # in order to keep output non-intermixed together, disable parallel building
5 # of different targets in this d/rules but allow running parallel submakes
6 .NOTPARALLELscip-debian debian busybox 1:1.38.0-3 busybox/rules/`.NOTPARALLEL`().:
7 # DEB_BUILD_OPTIONS=parallel=N
8 MAKEFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/MAKEFLAGS. += $(substscip-debian debian busybox 1:1.38.0-3 busybox/rules/subst. parallel=,-j,$(filterscip-debian debian busybox 1:1.38.0-3 busybox/rules/filter. parallel=%,${DEB_BUILD_OPTIONSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_BUILD_OPTIONS.}))
9
10 # Uncomment this to turn on verbose mode.
11 #export DH_VERBOSE=1
12 Vscip-debian debian busybox 1:1.38.0-3 busybox/rules/V. = $(ifscip-debian debian busybox 1:1.38.0-3 busybox/rules/if. $(filterscip-debian debian busybox 1:1.38.0-3 busybox/rules/filter. terse, ${DEB_BUILD_OPTIONSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_BUILD_OPTIONS.}),,1)
13
14 # Activate full hardening build flags
15 export DEB_BUILD_MAINT_OPTIONSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_BUILD_MAINT_OPTIONS. := hardening=+all
16 # Fast version of dpkg/architecture.mk defining all vars in one go
17 ifeq (${DEB_HOST_MULTIARCHscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_MULTIARCH.},)
18 $(foreach d, $(shell dpkg-architecture | sed 's/=/?=/'), $(eval export $d))
19 endif
20 include /usr/share/dpkg/default.mk
21
22 ##############################################################################
23
24 TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV. = SKIP_KNOWN_BUGS=y
25 #TESTSUITE_ENV = VERBOSE=y
26 # always run tests in UTF8 mode to verify unicode support
27 TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV. += LANG=C.UTF-8 LC_ALL=C.UTF-8
28 TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV. += SKIP_INTERNET_TESTS=y
29 # Required for testsuite/taskset.tests
30 TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV. += SHELL='${SHELL}'
31 # dash echo does not understand -e, bb builds its own in this case
32 TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV. += ECHO=/bin/echo
33
34 # build directory
35 bscip-debian debian busybox 1:1.38.0-3 busybox/rules/b. = b
36
37 # which flavours to build
38 flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours. = deb static udeb
39
40 ifneq (${DEB_HOST_GNU_TYPEscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_GNU_TYPE.},${DEB_BUILD_GNU_TYPEscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_BUILD_GNU_TYPE.})
41 export CROSS_COMPILEscip-debian debian busybox 1:1.38.0-3 busybox/rules/CROSS_COMPILE. = ${DEB_HOST_GNU_TYPEscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_GNU_TYPE.}-
42 endif
43
44 # We filter the following from CFLAGS:
45 # -O2
46 # to use the optimization setting from busybox's configuration and build
47 # system, causing it to use -Os. This reduces built binaries' size
48 # considerably, making it easier to fit on space constrained systems.
49 CFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/CFLAGS. := $(filter-outscip-debian debian busybox 1:1.38.0-3 busybox/rules/filter-out. -O2, ${CFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/CFLAGS.})
50
51 # Avoid Kconfig outputting the timestamp into generated configuration files. We
52 # use this to compare against the configuration files in debian/config/pkg for
53 # builds on Linux so that we can detect upstream configuration changes (e.g.
54 # added applets).
55 export KCONFIG_NOTIMESTAMPscip-debian debian busybox 1:1.38.0-3 busybox/rules/KCONFIG_NOTIMESTAMP.=1
56
57 installscip-debian debian busybox 1:1.38.0-3 busybox/rules/install().-indepscip-debian debian busybox 1:1.38.0-3 busybox/rules/install-indep(). install-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/install-arch(). install \
58 binaryscip-debian debian busybox 1:1.38.0-3 busybox/rules/binary().-indepscip-debian debian busybox 1:1.38.0-3 busybox/rules/binary-indep(). binary-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/binary-arch(). binary \
59 : %:
60 dh $@
61
62 ##############################################################################
63
64 configurescip-debian debian busybox 1:1.38.0-3 busybox/rules/configure().: $(patsubstscip-debian debian busybox 1:1.38.0-3 busybox/rules/patsubst. %,$b/%/.stamp-setupscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-setup`., ${flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})
65 $(scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix configure-,${flavours})`().addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix configure-,${flavours})`().configure-,${scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix configure-,${flavours})`().flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix configure-,${flavours})`().: configure-%: $b/%/.stamp-setupscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-setup`.
66 .PHONYscip-debian debian busybox 1:1.38.0-3 busybox/rules/`.PHONY`().: configure $(addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. configure-,${flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})
67
68 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-setup`().b/%/.stamp-setupscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-setup`.: d = $b/scip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/`.$*
69 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-setup`().b/%/.stamp-setupscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-setup`.:
70 rm -rf $d
71 mkdir -p $d
72
73 # Generate the .config file. First variable assignment wins.
74 # Several steps..
75
76 # 1, put any arch-specific overrides so they will have higher precedence
77 # should be empty for linux
78 cat debian/config/os/${DEB_HOST_ARCH_OS} > $d/.config
79
80 # 2, use the flavour-specific base config file.
81 cat debian/config/pkg/$* >> $d/.config
82
83 # 3, sort out the result using oldconfig Kbuild machinery and generate Makefile
84 yes "" | ${MAKE} -C $d -f "${CURDIR}/Makefile" KBUILD_SRC="${CURDIR}" silentoldconfig V=$V
85
86 # 4, on linux platform only, compare the re-generated config to the shipped
87 # config in the package in order to catch new/changed upstream options.
88 ifeq (linux,${DEB_HOST_ARCH_OSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_ARCH_OS.})
89 diff -u debian/config/pkg/$* $d/.config
90 endif
91
92 ln -s .config $@
93
94 ##############################################################################
95
96 build-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/build-arch().: $(patsubstscip-debian debian busybox 1:1.38.0-3 busybox/rules/patsubst. %,$b/%/.stamp-buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-build`., ${flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})
97 buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/build().: build-arch
98 $(scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix build-,${flavours})`().addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix build-,${flavours})`().build-,${scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix build-,${flavours})`().flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix build-,${flavours})`().: build-%: $b/%/.stamp-buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-build`.
99 build-indepscip-debian debian busybox 1:1.38.0-3 busybox/rules/build-indep().:
100 .PHONYscip-debian debian busybox 1:1.38.0-3 busybox/rules/`.PHONY`().: build build-arch build-indep $(addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. build-,${flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})
101
102 # busybox build procedure is very sensitive for (environment) variables, it will
103 # remake everything if CFLAGS or LD has changed between build and install phases
104 # (and install depends on build, so busybox will be rebuilt during install if
105 # any env var has changed).
106 # Another problem is that upstream build system (as of 1.35) can not take more
107 # than a single target to build when building in parallel, the build fails in
108 # this case. So we can not ask it for `all install' for example.
109 # To work around this, we use the upstream makefile only at the build stage,
110 # providing all environment explicitly in a single place.
111 # And installing will be done without the help from upstream makefiles,
112 # based on the information in the generated busybox.links file.
113
114 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-build`().b/%/.stamp-buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-build`.: d = $b/scip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/`.$*
115 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-build`().b/%/.stamp-buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-build`.: $b/%/.stamp-setupscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-setup`.
116 ${MAKEscip-debian debian busybox 1:1.38.0-3 busybox/rules/MAKE.} -C $d all \
117 SKIP_STRIP=y \
118 BB_EXTRA_VERSION="${DEB_VENDORscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_VENDOR.} ${DEB_VERSIONscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_VERSION.}" \
119 CONFIG_EXTRA_CFLAGS='${CFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/CFLAGS.} ${CPPFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/CPPFLAGS.}' \
120 CONFIG_EXTRA_LDFLAGS='${CFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/CFLAGS.} ${LDFLAGSscip-debian debian busybox 1:1.38.0-3 busybox/rules/LDFLAGS.}' \
121 V=$V
122 ${MAKEscip-debian debian busybox 1:1.38.0-3 busybox/rules/MAKE.} -C $d busybox.links
123 ln -sf busybox $@
124
125 ##############################################################################
126
127 build-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/build-arch().: $(ifscip-debian debian busybox 1:1.38.0-3 busybox/rules/if. $(filterscip-debian debian busybox 1:1.38.0-3 busybox/rules/filter. nocheck,${DEB_BUILD_OPTIONSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_BUILD_OPTIONS.}),,test-deb)
128 $(scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix test-,${flavours})`().addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix test-,${flavours})`().test-,${scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix test-,${flavours})`().flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$(addprefix test-,${flavours})`().: test-%: $b/%/.stamp-testscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-test`.
129 .PHONYscip-debian debian busybox 1:1.38.0-3 busybox/rules/`.PHONY`().: $(addprefixscip-debian debian busybox 1:1.38.0-3 busybox/rules/addprefix. test-,${flavoursscip-debian debian busybox 1:1.38.0-3 busybox/rules/flavours.})
130
131 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-test`().b/%/.stamp-testscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-test`.: d = $b/scip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/`.$*
132 $scip-debian debian busybox 1:1.38.0-3 busybox/rules/`$b/%/.stamp-test`().b/%/.stamp-testscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-test`.: $b/%/.stamp-buildscip-debian debian busybox 1:1.38.0-3 busybox/rules/`b/%/.stamp-build`.
133 @echo ======== running testsuite in $d ========
134 @if [ ! -f $d/testsuite/.setup ]; then \
135 rm -rf $d/testsuite ; \
136 cp -al testsuite $d/ ; \
137 rm -f $d/testsuite/mdev.tests; \
138 [ ! -f debian/testsuite-${DEB_HOST_ARCH_OSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_ARCH_OS.}.diff ] || \
139 patch -p1 -d $d/ \
140 < debian/testsuite-${DEB_HOST_ARCH_OSscip-debian debian busybox 1:1.38.0-3 busybox/rules/DEB_HOST_ARCH_OS.}.diff ; \
141 touch $d/testsuite/.setup ; \
142 fi
143 cd $d/testsuite && ${TESTSUITE_ENVscip-debian debian busybox 1:1.38.0-3 busybox/rules/TESTSUITE_ENV.} ./runtest
144 touch $@
145
146 ##############################################################################
147
148 cleanscip-debian debian busybox 1:1.38.0-3 busybox/rules/clean().:
149 dh_cleanscip-debian debian debhelper . dh_clean(). $b/
150 rm -f .kernelrelease # leftover from the build process
151 .PHONYscip-debian debian busybox 1:1.38.0-3 busybox/rules/`.PHONY`().: clean
152
153 ##############################################################################
154
155 override_dh_auto_installscip-debian debian busybox 1:1.38.0-3 busybox/rules/override_dh_auto_install().:
156
157 execute_after_dh_link-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/execute_after_dh_link-arch().:
158 # for udeb we also need links. But we can not easily use `make install'
159 # (see comment above). So we run the install rules directly here:
160 dh_linkscip-debian debian debhelper . dh_link(). -pbusybox-udeb \
161 $$(grep -v sbin/init $b/udeb/busybox.links | \
162 sed -e 's|/usr/|/|' -e 's|^|/usr/bin/busybox /usr|')
163
164 execute_before_dh_gencontrol-archscip-debian debian busybox 1:1.38.0-3 busybox/rules/execute_before_dh_gencontrol-arch().:
165 # after shlibdeps finished, grab ${shlibs:Depends} from busybox package
166 # and transform it into Built-Using field (also dpkg-query bug #588505)
167 pkgs=$$(sed -n -e's/([^)]*)//g' -e's/,//g' -e's/^shlibs:Depends=//p' debian/busybox.substvars); \
168 srcs=; for p in $$pkgs; do \
169 srcs="$$srcs $$(dpkg-query -f '$${source:Package} (= $${source:Version}),' -W $$p)"; \
170 done ; \
171 echo "built-using=$$srcs" >> debian/busybox-static.substvars
172
173 # install busybox-klogd startup scripts
174 execute_before_dh_installinitscip-debian debian busybox 1:1.38.0-3 busybox/rules/execute_before_dh_installinit().:
175 dh_installinitscip-debian debian debhelper . dh_installinit(). -pbusybox-syslogd --name=busybox-klogd
176 override_dh_installsystemdscip-debian debian busybox 1:1.38.0-3 busybox/rules/override_dh_installsystemd().:
177 # explicitly list all packages with .service files here
178 dh_installsystemdscip-debian debian debhelper . dh_installsystemd(). -pbusybox-syslogd --name=busybox-klogd
179 dh_installsystemdscip-debian debian debhelper . dh_installsystemd(). -pbusybox-syslogd
180 dh_installsystemdscip-debian debian debhelper . dh_installsystemd(). -pudhcpd --no-enable