Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
RANGE=""
RET=""
+NUM_CPUS=$(echo $(($(cat /proc/cpuinfo | grep processor | tail -1 | awk '{print $3}')+1)))
# If $HOME/compat-ksrc is found use that, otherwise use system-wide
# sources in /usr/src.
NOCOLOR="1" log_try_kernel $KERNEL >> $LOG
log_try_kernel $KERNEL
- #ionice -c 3 nice -n 20 make $QUIET KLIB=$DIR KLIB_BUILD=$DIR -j6 -Wunused-but-set-variable $ARGS &>> $LOG
- ionice -c 3 nice -n 20 make $QUIET KLIB=$DIR KLIB_BUILD=$DIR -j6 $ARGS &>> $LOG
+ #ionice -c 3 nice -n 20 make $QUIET KLIB=$DIR KLIB_BUILD=$DIR -j${NUM_CPUS} -Wunused-but-set-variable $ARGS &>> $LOG
+ ionice -c 3 nice -n 20 make $QUIET KLIB=$DIR KLIB_BUILD=$DIR -j${NUM_CPUS} $ARGS &>> $LOG
CUR_RET=$?
if [[ $RET = "" ]]; then