[scripts][buildall] try to guess the number of cpus on linux machines
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# build everything in the projects directory
|
||||
PROJECTS=`echo project/* | xargs basename | sed 's/\.mk//'`
|
||||
PROJECTS=`echo project/* | xargs -n1 basename | sed 's/\.mk//'`
|
||||
FAILED=""
|
||||
|
||||
UNAME=`uname`
|
||||
case `uname` in
|
||||
Linux)
|
||||
N=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
PARALLEL=-j`expr $N + $N`
|
||||
;;
|
||||
*)
|
||||
PARALLEL=-j4
|
||||
;;
|
||||
esac
|
||||
|
||||
for p in $PROJECTS; do
|
||||
PROJECT=$p nice make -j4 || FAILED="$FAILED $p"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user