summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-08-16 05:07:39 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2011-08-16 05:07:39 (GMT)
commitca6145d5f06f8a7f02cd5f8807780483619ac518 (patch)
tree1c1644418de1bf25ec318596986cc2775dce21d9
parent44e2d6e48c5839e2a9ec8c0eb7c7a320a60ab7da (diff)
downloadktest-ca6145d5f06f8a7f02cd5f8807780483619ac518.zip
ktest-ca6145d5f06f8a7f02cd5f8807780483619ac518.tar.gz
ktest-ca6145d5f06f8a7f02cd5f8807780483619ac518.tar.bz2
ktest-ca6145d5f06f8a7f02cd5f8807780483619ac518.tar.xz
allmake: allow setting the number of jobs
-rwxr-xr-xallmake.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/allmake.sh b/allmake.sh
index a085478..0a5111b 100755
--- a/allmake.sh
+++ b/allmake.sh
@@ -16,8 +16,10 @@ fi
here=`dirname "$0"`
-cpus=$(grep '^processor' < /proc/cpuinfo | wc -l)
-jobs=$((cpus))
+if [ -z "$JOBS" ]; then
+ cpus=$(grep '^processor' < /proc/cpuinfo | wc -l)
+ JOBS=$((cpus))
+fi
# This can be 'ccache gcc'
gcc=gcc
@@ -80,6 +82,6 @@ $c:
EOF
done
-make -j$jobs -f $MKFILE "$@"
-make -j$jobs -f $MKFILE FDARGS="$fdargs" TARGET=isoimage TEEOPT='-a' "$@"
+make -j$JOBS -f $MKFILE "$@"
+make -j$JOBS -f $MKFILE FDARGS="$fdargs" TARGET=isoimage TEEOPT='-a' "$@"
rm -f $MKFILE