[sagemath] 02/02: Fix parallel building.

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 11 13:13:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sagemath.

commit 4afc182e486bf1be6331afaf688a5f70cf4769cd
Author: Tobias Hansen <thansen at broeselmaschine.fc.up.pt>
Date:   Sun Dec 11 01:21:37 2016 +0000

    Fix parallel building.
---
 debian/rules | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index bff2a97..ed0e945 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,12 @@ DOCS_INSTALL = $(LANGS:%=debian/sagemath-doc-%.install)
 DOCS_CONTROL = $(LANGS:%=debian/sagemath-doc-%.control)
 DOCS_DOC_BASE = $(LANGS:%=debian/sagemath-doc-%.doc-base)
 
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+NUMJOBS = 1
+endif
+
 %:
 	dh $@ --with=python2,sphinxdoc
 
@@ -62,7 +68,7 @@ else
 DEB_BUILD_TARGET = all
 endif
 override_dh_auto_build: prune
-	dh_auto_build -Dsage -- $(DEB_BUILD_TARGET)
+	MAKE='make -j$(NUMJOBS)' make --directory=sage $(DEB_BUILD_TARGET)
 
 override_dh_auto_test: ptestlong
 
@@ -162,7 +168,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	# to detect a previous successful (override_)dh_auto_build, so if we run
 	# `debian/rules build` twice it will go directly to (override_)dh_auto_test
 	# (and then this target) without trying (override_)dh_auto_build again.
-	cd sage && ./sage -t -p --all --long $(EXTRA_SAGE_TEST_FLAGS) --logfile=logs/ptestlong.log || true
+	cd sage && ./sage -t -p $(NUMJOBS) --all --long $(EXTRA_SAGE_TEST_FLAGS) --logfile=logs/ptestlong.log || true
 	test $$(dpkg-parsechangelog -SDistribution) = unstable-sage || debian/rules had-few-failures
 endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list