bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4.4.1 breaks recursive invocation with --print-directory [when addin


From: Dmitry Goncharov
Subject: Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]
Date: Wed, 1 Mar 2023 07:30:23 -0500

On Tue, Feb 28, 2023 at 11:35 PM Satish Balay via Bug reports and
discussion for GNU make <bug-make@gnu.org> wrote:
> And the reason we use the order '-j8 ${MAKEFLAGS}' is so that we have the 
> following behavior':
>
> - invoking 'make' defaults to using a default of '-j8'
> - invoking 'make -j4' gives: '-j8 -j4' - i.e ability to override this 
> (pre-set) default [when needed].
>
> Will have to see if we can reorder options in the recommended order - in our 
> intermediate makefile.


Oops, i didn't expect that you'd treat that email as "the recommended order"..
In the particular case of --print-directory and -j1, appending -j1 would work.
However, the latest make also keeps command line definitions as the
last thing in makeflags.
So, if you appended -j1 and also specified a command line definition,
e.g. v=1, then makeflags would become
-- v=1 -j1
and the submake would take -j1 as a target.
i do not recommend appending or prepending to env variable MAKEFLAGS.
In fact, i recommend against it.

Why don't you pass -j1 as the command line switch to submake?
all:; @$(MAKE) -j1 hello
hello:; @echo Hello

This would work with the old and new versions of make.

regards, Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]