Commit in SimDist/build on MAIN
package.gmk.in+8-51.14 -> 1.15
util.m4+221.21 -> 1.22
+30-5
2 modified files
support multiple make jobs

SimDist/build
package.gmk.in 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- package.gmk.in	14 Jul 2010 18:01:09 -0000	1.14
+++ package.gmk.in	9 Jun 2011 01:44:02 -0000	1.15
@@ -1,4 +1,4 @@
-# $Id: package.gmk.in,v 1.14 2010/07/14 18:01:09 jeremy Exp $
+# $Id: package.gmk.in,v 1.15 2011/06/09 01:44:02 jeremy Exp $
 
 #
 # Generic package build rules.
@@ -14,6 +14,9 @@
 # Common build variables of SimDist.
 include ../../build/common.gmk
 
+# Set global number of multiple make jobs (per package build not top-level).
+PACKAGE_NJOBS=@PACKAGE_NJOBS@
+
 # Name of the package.
 ifndef PACKAGE_NAME
   PACKAGE_NAME = $(shell basename $(CURDIR))
@@ -147,13 +150,13 @@
 
 # Build the package by executing the default make rule.
 compile:
-	@echo "Compiling $(PACKAGE_NAME) ..." ; \
-	cd $(PACKAGE_BUILDDIR) && $(MAKE);:
+	@echo "Compiling $(PACKAGE_NAME) with $(PACKAGE_NJOBS) make jobs ..." ; \
+	cd $(PACKAGE_BUILDDIR) && $(MAKE) -j $(PACKAGE_NJOBS);:
 
 # Build the package by executing the all make rule.
 compile_all:
-	@echo "Compiling $(PACKAGE_NAME) ..." ; \
-	cd $(PACKAGE_BUILDDIR) && $(MAKE) all;:
+	@echo "Compiling $(PACKAGE_NAME) with $(PACKAGE_NJOBS) make jobs ..." ; \
+	cd $(PACKAGE_BUILDDIR) && $(MAKE) -j $(PACKAGE_NJOBS) all;:
 
 # Install the package by executing the install target.
 install:

SimDist/build
util.m4 1.21 -> 1.22
diff -u -r1.21 -r1.22
--- util.m4	24 May 2011 18:40:41 -0000	1.21
+++ util.m4	9 Jun 2011 01:44:02 -0000	1.22
@@ -360,3 +360,25 @@
 fi
 
 ])
+
+dnl Macro to set the number of simultaneous jobs for each package build.
+AC_DEFUN(AC_WITH_NJOBS, [
+
+AC_MSG_CHECKING(for number of make jobs)
+
+AC_ARG_WITH(njobs,
+       AC_HELP_STRING([--with-njobs=<njobs>], [number of simultaneous make jobs]),
+       [njobs="$with_njobs"],
+       [njobs="1"])
+
+AC_MSG_RESULT($njobs)
+
+dnl Why does three brackets work to escape this???
+if [[[ ${njobs} = *[^0-9]* ]]] ; then
+    AC_MSG_ERROR([${njobs} has a non-digit somewhere in it.])
+fi
+
+PACKAGE_NJOBS=$njobs
+AC_SUBST(PACKAGE_NJOBS)
+
+])
CVSspam 0.2.8