[Git][debian-gis-team/postgis][master] 2 commits: Enable parallel builds.

Bas Couwenberg gitlab at salsa.debian.org
Fri May 4 20:57:25 BST 2018


Bas Couwenberg pushed to branch master at Debian GIS Project / postgis


Commits:
cde6d94c by Bas Couwenberg at 2018-05-04T20:40:47+02:00
Enable parallel builds.

- - - - -
e63ce423 by Bas Couwenberg at 2018-05-04T21:16:44+02:00
Don't use parallel for doc & man-install targets.

- - - - -


2 changed files:

- debian/changelog
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ postgis (2.4.4+dfsg-2) UNRELEASED; urgency=medium
   * Re-enable SFCGAL support, FTBFS with CGAL 4.11 is fixed.
   * Drop unnecessary get-orig-source target from rules file.
   * Bump Standards-Version to 4.1.4, changes: get-orig-source target.
+  * Enable parallel builds.
+  * Don't use parallel for doc & man-install targets.
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 06 Apr 2018 16:39:56 +0200
 


=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -107,8 +107,13 @@ COMMON_CONFIGURE_ARGS = --host=$(DEB_HOST_GNU_TYPE) \
 	--without-interrupt-tests \
 	--with-gui
 
+NJOBS := -j1
+ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+NJOBS := -j$(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+endif
+
 %:
-	dh $@ --with autoreconf
+	dh $@ --with autoreconf --parallel
 
 override_dh_autoreconf:
 	dh_autoreconf ./autogen.sh
@@ -123,8 +128,8 @@ override_dh_auto_clean: debian/control
 		rm -rf $(CURDIR)/debian/build-$$PGVER; \
 	done)
 
-	[ ! -f GNUmakefile ] || $(MAKE) distclean || true
-	[ ! -f GNUmakefile ] || $(MAKE) -C doc images-clean || true
+	[ ! -f GNUmakefile ] || $(MAKE) $(NJOBS) distclean || true
+	[ ! -f GNUmakefile ] || $(MAKE) $(NJOBS) -C doc images-clean || true
 
 #	Cleanup after the Makefile
 	rm -f postgis/postgis_upgrade_20_minor.sql.in \
@@ -169,30 +174,30 @@ override_dh_auto_configure:
 override_dh_auto_build-arch: build-arch-stamp
 build-arch-stamp:
 #	Build against the newest Postgres version
-	$(MAKE)
-	$(MAKE) -C doc
+	$(MAKE) $(NJOBS)
+	$(MAKE) $(NJOBS) -C doc
 
 #	Build against all other Postgres versions
 	(set -e; \
 	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
-		$(MAKE) -C $(CURDIR)/debian/build-$$PGVER; \
+		$(MAKE) $(NJOBS) -C $(CURDIR)/debian/build-$$PGVER; \
 	done)
 
 	touch $@
 
 override_dh_auto_build-indep: build-arch-stamp
 #	Let PostGIS create a perl script from postgis_restore.pl.in
-	$(MAKE) -C utils
+	$(MAKE) $(NJOBS) -C utils
 
 #	Create a few SQL scripts that the Makefiles are not clever enough
 #	to resolve, when building arch-indep only.
-	$(MAKE) -C postgis postgis.sql postgis_upgrade.sql
-	$(MAKE) -C raster/rt_pg rtpostgis.sql rtpostgis_upgrade.sql
-	$(MAKE) -C topology topology.sql topology_upgrade.sql
+	$(MAKE) $(NJOBS) -C postgis postgis.sql postgis_upgrade.sql
+	$(MAKE) $(NJOBS) -C raster/rt_pg rtpostgis.sql rtpostgis_upgrade.sql
+	$(MAKE) $(NJOBS) -C topology topology.sql topology_upgrade.sql
 
 #	This creates the required SQL scripts. Again, the Makefile is not
 #	clever enough to run this before 'install'.
-	$(MAKE) -C extensions
+	$(MAKE) $(NJOBS) -C extensions
 
 override_dh_auto_test:
 #   Run unit tests (against the newest Postgres version, first)
@@ -232,17 +237,17 @@ override_dh_auto_install-indep:
 #	install only utils and extensions. However, there are sql scripts
 #	in postgis, raster and topology as well, which need to be
 #	installed for the -scripts package(s).
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	$(MAKE) $(NJOBS) install DESTDIR=$(CURDIR)/debian/tmp
 
 #	Install all older Postgres versions.
 	(set -e; \
 	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
-		$(MAKE) -C $(CURDIR)/debian/build-$$PGVER \
+		$(MAKE) $(NJOBS) -C $(CURDIR)/debian/build-$$PGVER \
 			install DESTDIR=$(CURDIR)/debian/tmp; \
 	done)
 
 #	Compile and install docs
-	$(MAKE) -C doc docs-install \
+	$(MAKE) $(NJOBS) -C doc docs-install \
 			DESTDIR=$(CURDIR)/debian/tmp \
 			PGSQL_DOCDIR=/usr/share/doc
 
@@ -266,20 +271,20 @@ override_dh_install-indep:
 
 override_dh_auto_install-arch:
 #	Install the extension for the most recent Postgres verison
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	$(MAKE) $(NJOBS) install DESTDIR=$(CURDIR)/debian/tmp
 
 #	Install the extensions for the older Postgres versions
 	(set -e; \
 	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
-		$(MAKE) -C $(CURDIR)/debian/build-$$PGVER \
+		$(MAKE) $(NJOBS) -C $(CURDIR)/debian/build-$$PGVER \
 			install DESTDIR=$(CURDIR)/debian/tmp; \
 	done)
 
 #	Install docs and man pages
 	$(MAKE) -C doc man-install \
-			DESTDIR=$(CURDIR)/debian/tmp \
-			PGSQL_DOCDIR=/usr/share/doc \
-			PGSQL_MANDIR=/usr/share/man
+		DESTDIR=$(CURDIR)/debian/tmp \
+		PGSQL_DOCDIR=/usr/share/doc \
+		PGSQL_MANDIR=/usr/share/man
 
 #	Auto-create required .install file for each Postgres major version
 	(set -e; \



View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/compare/830cbd8091b7e6dc11939b7b2eeeeb016e7e8dc2...e63ce423f8a68736952b7549b866f26b1a3d2ac6

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/compare/830cbd8091b7e6dc11939b7b2eeeeb016e7e8dc2...e63ce423f8a68736952b7549b866f26b1a3d2ac6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180504/5538bc47/attachment-0001.html>


More information about the Pkg-grass-devel mailing list