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

Matteo Bernardini matteo.bernardini at gmail.com
Sun Apr 3 19:26:37 UTC 2022


Il giorno dom 3 apr 2022 alle ore 20:59 Slackbuilds <sbo at linuxgalaxy.org>
ha scritto:

> Most of my testing for submission is in a VM (either 2, 4 or 6 cores,
> depending on how many I fire up on the Ryzen 9).  Settings MAKEFLAGS
> will hide NUMJOBS and is not appropriate since it obscures what was
> used. My VMs may not have the expected cores. It's better to have this
> available to explicitly set in the script as needed. Having
> NUMJOBS=${NUMJOBS:-1} as the default provides a suitable fallback.
>

like netrixtrardis wrote you can use a dynamic setting also for MAKEFLAGS:
on my systems I have

export MAKEFLAGS=${MAKEFLAGS:--j$(expr $(nproc) + 1)}

this way you can use it on every machine regardless of their resources.
Il giorno dom 3 apr 2022 alle ore 21:19 Ozan Türkyılmaz <
ozan.turkyilmaz at gmail.com> ha scritto:

> Don't do that. MAKEFLAGS is for passing command line arguments to
> submake processes [1]. I dont know if MAKEFLAGS="-j2" sh configure
> would do any problem or even make would get it.
>
> Regards,
> Ozan
>
> [1] There's some long talk abut it
> here:
> https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html
> Also here: https://stackoverflow.com/a/19622824/7247759
>

Hi Ozan,

the first link you cite contains a couple of paragraphs that say that is
perfectly legit to use MAKEFLAGS to set parallel make jobs, the second
discussion on stackoverflow is only about the opportunity to set MAKEFLAGS
inside a Makefile.

Matteo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20220403/316c778a/attachment-0001.htm>


More information about the SlackBuilds-users mailing list