From 84dd906913e8482be980d093bc937bf3c3749e29 Mon Sep 17 00:00:00 2001 Message-Id: <84dd906913e8482be980d093bc937bf3c3749e29.1718347630.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 26 Jan 2012 10:01:18 +0000 Subject: [PATCH] bin/mdw-build: Do parallel builds as instructed by DEB_BUILD_OPTIONS. Organization: Straylight/Edgeware From: Mark Wooding This wants to be set right anyway for the Debian build, and it's better to say such things only once. --- bin/mdw-build | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 -- [mdw]