Boost currently builds during CST stage, which is serial in make. We should thus be able to steal make's processes and build in parallel.
GNU make always sets MAKEFLAGS to <otheroptions> -j<NN [--jobserver> so one can parse the number of jobs to use using something like (even if the user gave --jobs 42 or --jobs:
JOBS=$(echo "$MAKEFLAGS" | perl -n -e 'm/.*(-j[0-9]+)/ and print $1')
then pass $JOBS to b2:
Boost currently builds during CST stage, which is serial in make. We should thus be able to steal make's processes and build in parallel.
GNU make always sets
MAKEFLAGSto<otheroptions> -j<NN [--jobserver>so one can parse the number of jobs to use using something like (even if the user gave--jobs 42or--jobs:then pass
$JOBStob2: