summaryrefslogtreecommitdiffstats
path: root/scripts/mk/buildopts.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:09 +0000
commit3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch)
tree9532e637f47d6ff7246ccbabb62d4e2b4b5908df /scripts/mk/buildopts.mk
parentAdding debian version 1.22.6. (diff)
downloaddpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz
dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/mk/buildopts.mk')
-rw-r--r--scripts/mk/buildopts.mk13
1 files changed, 11 insertions, 2 deletions
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