]> git.sur5r.net Git - i3/i3/commitdiff
debian: add support for dpkg-buildpackage -j parallelism
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 23 Jan 2012 22:20:10 +0000 (22:20 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 23 Jan 2012 22:22:24 +0000 (22:22 +0000)
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=209008#202

debian/rules

index a6bfc2c05e9ff13901f73681a5a5c9a469acda8c..38b60e1338380ffaead4a9c88e0457ba18e3ed02 100755 (executable)
@@ -4,6 +4,11 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 -include /usr/share/dpkg/buildflags.mk
 
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    MAKEFLAGS += -j$(NUMJOBS)
+endif
+
 build: build-arch build-indep
 build-arch: build-stamp
 build-indep: build-stamp