The following commit has been merged in the master branch:
commit a3d1c1e55914573f847dee2dab9edfa0224d4465
Author: Emmanuel Kasper <[email protected]>
Date:   Tue Feb 28 15:23:31 2012 +0100

    Enable NJOBS hack for parallel builds (make -j xx)
    
    Idea taken from
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413050

diff --git a/debian/rules b/debian/rules
index 27465f9..01adf97 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,12 @@ CFLAGS = -Wall -g
 
 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
+# Number of make jobs = number of cores + 1
+NJOBS:=$(shell echo $$(($$(getconf _NPROCESSORS_ONLN 2>/dev/null) + 1)))
+ifdef SETNJOBS
+       NJOBS:=$(SETNJOBS)
+endif
+
 # Override relevant make variables in original makefile
 DEB_MAME_OPTS = \
     OPT_FLAGS="-D'INI_PATH=\"/etc/mame\"'" \
@@ -141,7 +147,7 @@ endif
        dh $@
 
 override_dh_auto_build:
-       $(MAKE) -j3 $(DEB_MAME_OPTS) all
+       $(MAKE) -j$(NJOBS) $(DEB_MAME_OPTS) all
        $(CURDIR)/mame -createconfig
        mv mame.ini default.mame.ini
 

-- 
packaging for the mame arcade game emulator

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to