From 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:30:09 +0200 Subject: Merging upstream version 1.22.7. Signed-off-by: Daniel Baumann --- scripts/mk/buildopts.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts/mk/buildopts.mk') diff --git a/scripts/mk/buildopts.mk b/scripts/mk/buildopts.mk index c957777..734d55e 100644 --- a/scripts/mk/buildopts.mk +++ b/scripts/mk/buildopts.mk @@ -4,7 +4,16 @@ # Defines the following variables: # # DEB_BUILD_OPTION_PARALLEL: the argument for the parallel=N option. +# $(DEB_BUILD_OPTIONS) "parallel=2" "parallel=" "" +# $(DEB_BUILD_OPTION_PARALLEL) "2" "" unset +# $(DEB_BUILD_OPTION_PARALLEL:%=-j%) "-j2" "" "" -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - DEB_BUILD_OPTION_PARALLEL = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +ifndef dpkg_buildopts_mk_included +dpkg_buildopts_mk_included = yes + +dpkg_buildopts_parallel := $(filter parallel=%,$(DEB_BUILD_OPTIONS)) +ifdef dpkg_buildopts_parallel + DEB_BUILD_OPTION_PARALLEL = $(patsubst parallel=%,%,$(dpkg_buildopts_parallel)) endif + +endif # dpkg_buildopts_mk_included -- cgit v1.2.3