summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-08-27 01:10:34 +0200
committerJulian Andres Klode <jak@debian.org>2015-08-27 12:58:47 +0200
commit1476c59e4b93239176a2d4874ec950b489c924b2 (patch)
treef4869cbf824054adef3727335a8a68cd980f995a
parente6a12ff73a2e3246b9e475d9772e88c79a6249f7 (diff)
debian/rules: Only do parallel build if specified in DEB_BUILD_OPTIONS
It was not nice to use 2 * number of cores in all cases. Thanks: Jakub Wilk for the suggestion
-rwxr-xr-xdebian/rules4
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index f031cfddb..60966b09f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ export NOISY=1
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+export PARALLEL = $(or $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))),1)
# FOR AUTOCONF 2.52 AND NEWER ONLY
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
@@ -17,6 +18,9 @@ else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
+# Set the number of procs to be run in parallel from the options.
+confflags += --with-procs=$(PARALLEL)
+
# See below
-include build/environment.mak