make -j

By Hal Canary, 2011-08-18 12:00:00 (link)

Update: Russ reccomends 2N threads.

#!/bin/sh
## {$HOME}/bin/makej
renice 1 $$ > /dev/null
N_CPUS=`grep processor /proc/cpuinfo | wc -l`
N_THRDS=`expr ${N_CPUS:-1} "*" 2`
exec /usr/bin/make -j "$N_THRDS" "$@"

(back)