From: Loic Dachary Date: Sat, 2 May 2015 14:11:51 +0000 (+0200) Subject: build: make-debs.sh NPROC overrides make -j X-Git-Tag: v9.0.2~221^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8c7a781ef225338b82d98bbfae7ed4ea4fd9d8db;p=ceph.git build: make-debs.sh NPROC overrides make -j Building a package is disk intensive and running make -j8 on a machine with a spinner can actually be slower than make. NPROC=1 make-deb.sh overrides the default value of make -jX. Signed-off-by: Loic Dachary --- diff --git a/make-debs.sh b/make-debs.sh index 535b27b929bf..b8d3e46489cd 100755 --- a/make-debs.sh +++ b/make-debs.sh @@ -80,7 +80,11 @@ fi # b) do not sign the packages # c) use half of the available processors # -PATH=/usr/lib/ccache:$PATH dpkg-buildpackage -j$(($(nproc) / 2)) -uc -us +: ${NPROC:=$(($(nproc) / 2))} +if test $NPROC -gt 1 ; then + j=-j${NPROC} +fi +PATH=/usr/lib/ccache:$PATH dpkg-buildpackage $j -uc -us cd ../.. mkdir -p $codename/conf cat > $codename/conf/distributions <