summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-01-15 15:59:56 +0100
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-01-21 12:42:52 +0100
commit55234edb23c20b3c951dfbff559ea9bb937c72fd (patch)
tree04da06725825a4161e6b827e862d097d349b501e
parent0590007b388006a3bfcf8d0929fe8591b9635424 (diff)
randconfig.sh: set number of make jobs
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit c13dd47ecbbdb841042e1370c8011e84634db0e4) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rwxr-xr-xextra/scripts/randconfig.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/extra/scripts/randconfig.sh b/extra/scripts/randconfig.sh
index 5986a9b12..4c7126bbc 100755
--- a/extra/scripts/randconfig.sh
+++ b/extra/scripts/randconfig.sh
@@ -6,6 +6,7 @@
#
# The above builds random i386 configs and automatically stops after 30 minutes
+test "x$AWK" = "x" && AWK=awk
test "x$ARCH" = "x" && ARCH=`uname -m`
KCONFIG_ALLCONFIG=.config.allconfig
(echo TARGET_$ARCH=y
@@ -15,12 +16,21 @@ KCONFIG_ALLCONFIG=.config.allconfig
) > $KCONFIG_ALLCONFIG
export KCONFIG_ALLCONFIG
+if test "x$NCPU" = "x"
+then
+ test -r /proc/cpuinfo && \
+ eval `$AWK 'BEGIN{NCPU=0}
+/processor/{let NCPU++}
+END{if (NCPU<1) {NCPU=1}; print("NCPU="NCPU);}' /proc/cpuinfo` || \
+ NCPU=1
+fi
+MAKELEVEL="-j$NCPU"
i=0
while test ! -f STOP
do
- make $* randconfig > /dev/null
- make $* silentoldconfig > /dev/null
- if (make $*) 2>&1 >& mk.log
+ ARCH=$ARCH make $* randconfig > /dev/null
+ ARCH=$ARCH make $* silentoldconfig > /dev/null
+ if (make $MAKELEVEL $*) 2>&1 >& mk.log
then
:
else