kbuild: deb-pkg: allow to run debian/rules from output directory

'make O=... deb-pkg' creates the debian directory in the output
directory. However, currently it is impossible to run debian/rules
created in the separate output directory.

This commit delays the $(srctree) expansion by escaping '$' and by
quoting the entire command, making it possible to run debian/rules in
the output directory.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
This commit is contained in:
Masahiro Yamada 2023-12-26 22:52:41 +09:00
parent 159956f34e
commit eaf80f7f2c

View File

@ -19,7 +19,7 @@ binary: binary-arch binary-indep
binary-indep: build-indep
binary-arch: build-arch
$(MAKE) -f $(srctree)/Makefile $(make-opts) \
run-command KBUILD_RUN_COMMAND=+$(srctree)/scripts/package/builddeb
run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb'
.PHONY: build build-indep build-arch
build: build-arch build-indep