buildx.sh: utilize all available CPUs when compiling

This commit is contained in:
Pavel Roskin 2016-10-08 02:02:07 +00:00
parent 8e7d12ff50
commit b2bbaef640
1 changed files with 5 additions and 1 deletions

View File

@ -149,7 +149,7 @@ make_it()
# make module
if [ ! -e cookies/$mod_name.made ]; then
if ! make -C build_dir/$mod_name
if ! make -j $NPROC -C build_dir/$mod_name
then
echo ""
echo "make failed for module $mod_name"
@ -267,6 +267,10 @@ if [ ! -d cookies ]; then
fi
fi
if ! NPROC=`nproc`; then
NPROC=1
fi
while IFS=: read mod_file mod_dir mod_args
do
mod_args=`eval echo $mod_args`