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

Slackbuilds sbo at linuxgalaxy.org
Sun Apr 3 23:26:01 UTC 2022


On 4/3/22 12:34, Dave Woodfall wrote:
> On 03/04/22 22:19,
> Ozan Türkyılmaz <ozan.turkyilmaz at gmail.com> put forth the proposition:
>> Pzt, 2022-04-04 tarihinde 01:22 +0700 saatinde, Willy Sudiarto Raharjo
>> yazdı:
>>>
>>>
>>> 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.
>>>
>> 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
>
> But also
>
> The MAKEFLAGS variable can also be useful if you want to have certain
> options, such as ‘-k’ (see Summary of Options), set each time you run
> make. You simply put a value for MAKEFLAGS in your environment.
>
> However:
>
> If you do put MAKEFLAGS in your environment, you should be sure not to
> include any options that will drastically affect the actions of make and
> undermine the purpose of makefiles and of make itself. For instance, the
> ‘-t’, ‘-n’, and ‘-q’ options,
>
> Same ref[1]
>

As I understand re[1] globally setting MAKEFLAGS in one's environment
could stomp on (or end up being ignored) since MAKEFLAGS might be
already set in the makefile internally to pass info to the sub-makes
(recursive make), but not tested to see if already set.  Unintended
consequences.  Especially given the age variety of makefiles.

-Ed







More information about the SlackBuilds-users mailing list