summaryrefslogtreecommitdiffstats
path: root/make-debs.sh
diff options
context:
space:
mode:
authorLoic Dachary <ldachary@redhat.com>2015-05-02 16:11:51 +0200
committerLoic Dachary <ldachary@redhat.com>2015-05-05 19:16:56 +0200
commit8c7a781ef225338b82d98bbfae7ed4ea4fd9d8db (patch)
tree96100819059dc45d0ed70aa2fe60ba72517f703f /make-debs.sh
parentinstall-deps.sh: pip wheel for python dependencies (diff)
downloadceph-8c7a781ef225338b82d98bbfae7ed4ea4fd9d8db.tar.xz
ceph-8c7a781ef225338b82d98bbfae7ed4ea4fd9d8db.zip
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 <ldachary@redhat.com>
Diffstat (limited to 'make-debs.sh')
-rwxr-xr-xmake-debs.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/make-debs.sh b/make-debs.sh
index 535b27b929b..b8d3e46489c 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 <<EOF