aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-10-11 10:55:32 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-10-11 10:55:32 +0200
commite397010b88a4b8b2ef88e8cafb4d961df95e15fb (patch)
tree249c9bc68e28107c8bb8da800d52ecfd1836d551
parent75219d1bdaf0b5365f32b51c4d1ae6358a13225f (diff)
d/rules support DEB_BUILD_OPTIONS parallel
Build seems stable enough to support DEB_BUILD_OPTIONS parallel these days. Since we don't just dh we have to explicitly support that flag. Change-Id: Ia7fc590f81cdae5b4bd5abdfb36af7aaeddfa10c Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-rwxr-xr-xdebian/rules13
1 files changed, 10 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index ccd61406..f21cf767 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,6 +62,13 @@ endif
DPDK_STATIC_DIR = "debian/build/static-root"
DPDK_SHARED_DIR = "debian/build/shared-root"
+# now stable with parallel comilation, so support -j
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+ PAR := "1"
+endif
+
# kernel_modules can be passed via DEB_BUILD_OPTIONS to enable building the
# optional binary kernel modules package. By default it will be built against
# the current kernel, or ksrc can be passed with a path to the target kernel
@@ -139,7 +146,7 @@ endif
dh_auto_configure
override_dh_auto_build-indep:
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \
doc-guides-man
override_dh_auto_install-indep:
@@ -149,7 +156,7 @@ override_dh_auto_install-indep:
DESTDIR=debian/dpdk-doc install-doc
override_dh_auto_build-arch:
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build
# Unfortunately the decision about having static or shared libraries is
# made for the whole build, which then produces only .a or .so files
# (but not both).
@@ -162,7 +169,7 @@ override_dh_auto_build-arch:
cp -a $(DPDK_STATIC_DIR) $(DPDK_SHARED_DIR)
sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' \
$(DPDK_SHARED_DIR)/.config
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build
override_dh_auto_install-arch: LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_install-arch: