]> err.no Git - util-linux/commitdiff
Add parallel support to Debian build
authorTollef Fog Heen <tfheen@err.no>
Fri, 25 Feb 2011 12:56:39 +0000 (13:56 +0100)
committerTollef Fog Heen <tfheen@err.no>
Fri, 25 Feb 2011 12:56:39 +0000 (13:56 +0100)
Pick up parallelism factor from DEB_BUILD_OPTIONS

debian/rules

index 7bad98efa11576f4244e6677c6008563c05be992..d37c26983dff1db8d59e73128cad91face732d7b 100755 (executable)
@@ -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: