use --max-parallel=2 for Ubuntu
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Fri, 14 Sep 2018 06:46:39 +0000 (08:46 +0200)
committerJochen Sprickerhof <git@jochen.sprickerhof.de>
Fri, 14 Sep 2018 19:16:45 +0000 (21:16 +0200)
debian/rules

index c0391a1e69ca08056a21fff8397cecf20e84bd3e..3c9ead548ee651573399f52e6f46783bf7cebda5 100755 (executable)
@@ -16,23 +16,17 @@ ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
        CXXFLAGS+=--param ggc-min-expand=20
 endif
 
-ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
-        ifeq ($(DEB_HOST_ARCH),amd64)
-                export DEB_BUILD_MAINT_OPTIONS=parallel=2
-        endif
-        ifeq ($(DEB_HOST_ARCH),arm64)
-                export DEB_BUILD_MAINT_OPTIONS=parallel=2
-        endif
-        ifeq ($(DEB_HOST_ARCH),ppc64el)
-                export DEB_BUILD_MAINT_OPTIONS=parallel=2
-        endif
-endif
-
 BUILD_DOC = $(if $(shell dh_listpackages | grep libpcl-doc),-DWITH_DOCS=ON)
 
 # Multiarch.
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
+  PARALLEL=--max-parallel=2
+else
+  PARALLEL=
+endif
+
 .PHONY: override_dh_auto_configure \
        override_dh_install \
        override_dh_installchangelogs
@@ -106,4 +100,4 @@ override_dh_installchangelogs:
 
 
 %:
-       dh  $@ --builddirectory=build
+       dh  $@ $(PARALLEL) --builddirectory=build