From: Mark Wooding Date: Thu, 26 Jan 2012 10:01:18 +0000 (+0000) Subject: bin/mdw-build: Do parallel builds as instructed by DEB_BUILD_OPTIONS. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/84dd906913e8482be980d093bc937bf3c3749e29 bin/mdw-build: Do parallel builds as instructed by DEB_BUILD_OPTIONS. This wants to be set right anyway for the Debian build, and it's better to say such things only once. --- diff --git a/bin/mdw-build b/bin/mdw-build index bcd2ac6..2c4edaa 100755 --- a/bin/mdw-build +++ b/bin/mdw-build @@ -113,6 +113,18 @@ for opt; do esac done +## Parse DEB_BUILD_OPTIONS. +jobs=1 +set -- $DEB_BUILD_OPTIONS +for opt; do + case "$opt" in + parallel=*) jobs=${opt#*=} ;; + esac +done + +makeopts="" +case $jobs in 1) ;; *) makeopts="$makeopts -j$jobs" ;; esac + ###-------------------------------------------------------------------------- ### Utility functions. @@ -268,10 +280,10 @@ assign distdir $(make -f find-distdir.mk print-distdir) ## Get a tarball distribution. case "$distcheck" in yes) - run make distcheck + run make $makeopts distcheck ;; no) - run make dist + run make $makeopts dist ;; esac