Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: deb-pkg: split debian/rules

debian/rules is generated by shell, but the escape sequence (\$) is
unreadable.

debian/rules embeds only two variables (ARCH and KERNELRELEASE).

Split them out to debian/rules.vars, and check-in the rest of Makefile
code to scripts/package/debian/rules.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

+33 -29
+28
scripts/package/debian/rules
··· 1 + #!/usr/bin/make -f 2 + # SPDX-License-Identifier: GPL-2.0-only 3 + 4 + include debian/rules.vars 5 + 6 + srctree ?= . 7 + 8 + .PHONY: binary binary-indep binary-arch 9 + binary: binary-arch binary-indep 10 + binary-indep: build-indep 11 + binary-arch: build-arch 12 + $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \ 13 + KERNELRELEASE=$(KERNELRELEASE) \ 14 + run-command KBUILD_RUN_COMMAND=+$(srctree)/scripts/package/builddeb 15 + 16 + .PHONY: build build-indep build-arch 17 + build: build-arch build-indep 18 + build-indep: 19 + build-arch: 20 + $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \ 21 + KERNELRELEASE=$(KERNELRELEASE) \ 22 + $(shell $(srctree)/scripts/package/deb-build-option) \ 23 + olddefconfig all 24 + 25 + .PHONY: clean 26 + clean: 27 + rm -rf debian/files debian/linux-* 28 + $(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) clean
+5 -29
scripts/package/mkdebian
··· 263 263 EOF 264 264 fi 265 265 266 - cat <<EOF > debian/rules 267 - #!/usr/bin/make -f 268 - 269 - srctree ?= . 270 - KERNELRELEASE = ${KERNELRELEASE} 271 - 272 - .PHONY: clean build build-arch build-indep binary binary-arch binary-indep 273 - 274 - build-indep: 275 - build-arch: 276 - \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \ 277 - KERNELRELEASE=\$(KERNELRELEASE) \ 278 - \$(shell \$(srctree)/scripts/package/deb-build-option) \ 279 - olddefconfig all 280 - 281 - build: build-arch 282 - 283 - binary-indep: 284 - binary-arch: build-arch 285 - \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \ 286 - KERNELRELEASE=\$(KERNELRELEASE) \ 287 - run-command KBUILD_RUN_COMMAND=+\$(srctree)/scripts/package/builddeb 288 - 289 - clean: 290 - rm -rf debian/files debian/linux-* 291 - \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} clean 292 - 293 - binary: binary-arch 266 + cat <<EOF > debian/rules.vars 267 + ARCH := ${ARCH} 268 + KERNELRELEASE := ${KERNELRELEASE} 294 269 EOF 295 - chmod +x debian/rules 270 + 271 + cp "${srctree}/scripts/package/debian/rules" debian/ 296 272 297 273 exit 0