TT#23584 Honor parallel build support

We should honor the DEB_BUILD_OPTIONS parallel=N option and enable
paralell builds for all make(1) invocations, not just the main one.

Change-Id: I6aa0ae7e251aa5d9657a44581f4403ad6cfb073d
changes/95/28595/2
Guillem Jover 7 years ago
parent 6120351970
commit 152f660f9b

9
debian/rules vendored

@ -18,6 +18,13 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# Enable parallel builds.
NUMJOBS = 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@ -164,7 +171,7 @@ build-indep: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE) -j`nproc` all
$(MAKE) all
# make groups
$(call PACKAGE_GRP_BUILD_template)
$(call PACKAGE_EXTRA_BUILD_template)

Loading…
Cancel
Save