From b127603cb6d92f13f58e18653fba31c5f9af027a Mon Sep 17 00:00:00 2001 From: Tim Niemeyer Date: Thu, 9 May 2013 15:14:08 +0200 Subject: [PATCH] buildscript: use parallel make with the number of cpus Signed-off-by: Tim Niemeyer --- buildscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildscript b/buildscript index 4f2ba4f..5f11ad8 100755 --- a/buildscript +++ b/buildscript @@ -68,16 +68,17 @@ build() { opath=$(pwd) cd $target + cpus=$(grep processor /proc/cpuinfo | wc -l) case "$1" in "debug") make V=99 ;; "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 # actually this does northing!