summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-02-02 04:57:22 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-02 04:57:22 (GMT)
commite2b2812508ed47e78889d782df8838a288e5b09b (patch)
treea506924e75bc322219004c05ef22f4842450f3b0
parent5cc70905c271b09383afe54e9ef95d6824ad86ca (diff)
downloadabc8000-old-e2b2812508ed47e78889d782df8838a288e5b09b.zip
abc8000-old-e2b2812508ed47e78889d782df8838a288e5b09b.tar.gz
abc8000-old-e2b2812508ed47e78889d782df8838a288e5b09b.tar.bz2
abc8000-old-e2b2812508ed47e78889d782df8838a288e5b09b.tar.xz
tools/build.sh: parallelize more
-rwxr-xr-xtools/build.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/build.sh b/tools/build.sh
index bd783ca..cfc5fec 100755
--- a/tools/build.sh
+++ b/tools/build.sh
@@ -1,6 +1,12 @@
#!/bin/sh -xe
here="$(pwd)"
-cpus=2
+if [ -f /proc/cpuinfo ]; then
+ cpus=$(grep '^processor' /proc/cpuinfo | wc -l)
+else
+ cpus=2
+fi
+# 2 jobs per CPU
+cpus=$((cpus*2))
PATH="$here"/bin:"$PATH"
export PATH