buildscript: use parallel make with the number of cpus

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2013-05-09 15:14:08 +02:00 committed by Clemens John
parent a94b1c85d2
commit b127603cb6
1 changed files with 3 additions and 2 deletions

View File

@ -68,16 +68,17 @@ build() {
opath=$(pwd) opath=$(pwd)
cd $target cd $target
cpus=$(grep processor /proc/cpuinfo | wc -l)
case "$1" in case "$1" in
"debug") "debug")
make V=99 make V=99
;; ;;
"fast") "fast")
ionice -c 2 -- nice -n 1 -- make -j12 ionice -c 2 -- nice -n 1 -- make -j$[$cpus*2]
;; ;;
*) *)
ionice -c 3 -- nice -n 10 -- make -j8 ionice -c 3 -- nice -n 10 -- make -j$[$cpus+1]
;; ;;
esac esac
# actually this does northing! # actually this does northing!