[SCM] givaro: library for arithmetic and algebraic computations branch, master, updated. debian/3.2.13-1.1-27-gd9164b5

Lifeng Sun lifongsun at gmail.com
Fri Jun 8 15:21:49 UTC 2012


The following commit has been merged in the master branch:
commit 2cc5352ba3f08ee9abb44ea5063dd0e556234741
Author: Lifeng Sun <lifongsun at gmail.com>
Date:   Fri Jun 8 22:23:56 2012 +0800

    Revise d/rules to support parallel building.

diff --git a/debian/rules b/debian/rules
index eba86b1..dc5c249 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,14 +1,4 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets  by Bill Allombert 2001
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -20,20 +10,31 @@ CFLAGS		:= $(shell dpkg-buildflags --get CFLAGS)
 CPPFLAGS	:= $(shell dpkg-buildflags --get CPPFLAGS)
 CXXFLAGS	:= $(shell dpkg-buildflags --get CXXFLAGS)
 LDFLAGS		:= $(shell dpkg-buildflags --get LDFLAGS)
+
 DEB_HOST_MULTIARCH	?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-override_dh_auto_configure:
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+        NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+	NUMJOBS := 1
+endif
+
+export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+configure-stamp:
 	dh_testdir
 	dh_auto_configure -- --with-gmp --enable-shared \
 		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
+	touch $@
 
 override_dh_installexamples:
 	dh_installexamples -XMakefile -XMakefile.am -XMakefile.in
 
-build-arch:
-	dh build
+build-arch: configure-stamp
+	dh_testdir
+	$(MAKE) -j$(NUMJOBS)
 
-build-indep:
+build-indep: configure-stamp
 	dh_testdir
 	mkdir -p docs/givaro-dev-html
 	$(MAKE) -C docs docs_dev
@@ -50,6 +51,8 @@ binary-indep: build-indep
 binary: binary-arch binary-indep
 
 clean:
-	dh $@
+	dh_testdir
+	dh_auto_clean
+	dh_clean
 
 .PHONY: build build-arch build-indep binary binary-arch binary-indep clean

-- 
givaro: library for arithmetic and algebraic computations



More information about the debian-science-commits mailing list