[openfoam] 01/02: Limit parallel build to 3 processes on Ubuntu amd64 and arm64.
Anton Gladky
gladk at moszumanska.debian.org
Fri Nov 18 20:18:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository openfoam.
commit 9712cf627424101c4b59b366b74bf9e844f4a032
Author: Graham Inggs <ginggs at debian.org>
Date: Fri Nov 18 21:16:14 2016 +0100
Limit parallel build to 3 processes on Ubuntu amd64 and arm64.
---
debian/rules | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index e98f696..81f9e09 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,8 @@
#!/usr/bin/make -f
+
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+VENDOR := $(shell dpkg-vendor --derives-from Ubuntu && echo Ubuntu || echo Debian)
+
%:
dh $@ --parallel
@@ -46,10 +50,16 @@ export gperftools_install=$(CURDIR)/platforms/linux64Gcc
export WM_MPLIB=SYSTEMOPENMPI
unexport FOAMY_HEX_MESH
-NUMJOBS=1
+NUMJOBS := 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-endif
+ NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
+# Limit parallel build to 3 processes on Ubuntu amd64 and arm64
+ifeq ($(VENDOR),Ubuntu)
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64))
+ NUMJOBS := $(shell if test $(NUMJOBS) -gt 3; then echo 3 ; else echo $(NUMJOBS); fi)
+endif
+endif
export WM_NCOMPPROCS=$(NUMJOBS)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/openfoam.git
More information about the debian-science-commits
mailing list