From dcfaabf987b72fdffde8056cc263cc9c5c5a4f9a Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Thu, 12 Dec 2019 15:57:39 +0000 Subject: kbuild: deb-pkg: Honour DEB_BUILD_OPTIONS/parallel if present Currently if we rebuild the orig, diff and dsc triplet outside of the kernel build system then it will not honour the requested level of parallelism. Fix this by parsing DEB_BUILD_OPTIONS. Signed-off-by: Daniel Thompson --- scripts/package/mkdebian | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 53319e168e41..5833f17f47e0 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -224,6 +224,15 @@ cat < debian/rules srctree ?= . +ifneq (,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS))) + DEBIAN_KERNEL_JOBS := \$(subst parallel=,,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS))) +endif +ifdef DEBIAN_KERNEL_JOBS + MAKEFLAGS += -j\$(DEBIAN_KERNEL_JOBS) +endif + +.NOTPARALLEL: + build: \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ KBUILD_BUILD_VERSION=${revision} KBUILD_IMAGE=${KBUILD_IMAGE} \ -- cgit v1.2.3