[Slackbuilds-users] make -j${NUMJOBS} discussion
Slackbuilds
sbo at linuxgalaxy.org
Sun Apr 3 23:44:20 UTC 2022
On 4/3/22 11:59, B. Watson wrote:
> How about you do this instead?
>
> if [ -z "$MAKEFLAGS" ]; then
> NUMJOBS="${NUMJOBS:-1}"
> export MAKEFLAGS="-j$NUMJOBS"
> fi
> make
>
> ...that way, your builds work the way you want: they respect NUMJOBS
> if MAKEFLAGS isn't set... but they'll still work the way everyone else
> wants: people who already use MAKEFLAGS will still get the expected
> results.
I'm still not convinced that globally setting MAKEFLAGS won't have
unintended consequences. I keep seeing in the make docs that the
toplevel make creates/sets MAKEFILE for sub-makes, but isn't clear in
what happens if MAKEFILES is already set, unless upstream source adds
that logic.
Setting 'make -j$NUMJOBS' seems a safer path, and is what Pat does in
Slackware source.
-Ed
More information about the SlackBuilds-users
mailing list