don't call nproc if the system doesn't have it

This commit is contained in:
Enno Rehling 2015-03-02 22:56:35 +01:00
parent 86b0febac0
commit 48ea310364
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
ROOT=$(pwd) ROOT=`pwd`
while [ ! -d $ROOT/.git ]; do while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT) ROOT=`dirname $ROOT`
done done
[ -z $BUILD ] && BUILD=Debug [ -z $BUILD ] && BUILD=Debug
@ -11,7 +11,7 @@ MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
BIN_DIR="build-$MACHINE-$CC-$BUILD" BIN_DIR="build-$MACHINE-$CC-$BUILD"
[ -z "$JOBS" ] && JOBS=$(nproc) [ -z "$JOBS" ] && [ "" != "which nproc" ] && JOBS=`nproc`
DISTCC=`which distcc` DISTCC=`which distcc`
if [ ! -z "$DISTCC" ] ; then if [ ! -z "$DISTCC" ] ; then
JOBS=`distcc -j` JOBS=`distcc -j`