diff options
Diffstat (limited to '')
-rw-r--r-- | scripts/mk/buildopts.mk | 13 |
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 |