From edd40919c57db5a9f7d32c82ad5d5d0226013a80 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Fri, 25 Feb 2011 13:56:39 +0100 Subject: [PATCH] Add parallel support to Debian build Pick up parallelism factor from DEB_BUILD_OPTIONS --- debian/rules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 7bad98ef..d37c2698 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,10 @@ ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP=y endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NUMJOBS := -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + ifndef DEB_HOST_ARCH DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture) DEB_HOST_ARCH = $(DEB_BUILD_ARCH) @@ -41,7 +45,7 @@ build: build-stamp build-stamp: dh_testdir ./configure $(CONFOPTS) $(CROSS) - $(MAKE) all CPU=$(arch) arch=$(arch) + $(MAKE) all CPU=$(arch) arch=$(arch) $(NUMJOBS) touch build-stamp autofiles: -- 2.39.5