[Slackbuilds-users] make -j${NUMJOBS} discussion

netrixtardis netrixtardis at stealth3.com
Sun Apr 3 19:07:45 UTC 2022


On 4/3/2022 1:22 PM, Willy Sudiarto Raharjo wrote:
>> For compatibility, the default will be one core/thread.  Please do not
>> remove.  This is a feature and not a bug.
> You can just export MAKEFLAGS in your machine to achive same results 
> Don't expect others to use same machine as yours and we often test 
> those scripts in a VM with only small specs. We use -j1 explicitly 
> only for those who failed to run on multiple cores, but as for the 
> rest, we want to keep it like what we have now. 
What about using "$(($(nproc) + 1))" or "$(($(nproc) -1))"?
   NUMJOBS=${NUMJOBS:$(($(nproc) + 1))}
or a safe default of
   NUMJOBS=${NUMJOBS:$(($(nproc) - 1))}

The 2nd option having the safety of saving 1 core or thread from being 
compiled on.


More information about the SlackBuilds-users mailing list