> The manual doesn't actually say that MAKEOVERRIDES is exported like MAKEFLAGS 
> but I assume it is.

I was going to just say that MAKEFLAGS would be expanded before being exported, 
and indeed it is, but, having tried it, the results aren't quite what I would 
have expected, even having just skimmed the section on MAKEOVERRIDES that Paul 
just cited.

$ make TESTNAME=badger 2>&1 | grep MAKE
MAKEFLAGS= -- TESTNAME=badger
... eliding mentions of MAKE in my environment already...
MAKEOVERRIDES=${-*-command-variables-*-}
MAKELEVEL=1
$

So MAKEOVERRIDES is exported, though perhaps it doesn't need to be, but isn't 
expanded before being exported.

________________________________
From: David Boyce <[email protected]>
Sent: Thursday, May 6, 2021 09:48
To: Paul D. Smith <[email protected]>
Cc: Shareef Jalloq <[email protected]>; Martin Dorey 
<[email protected]>; Boris Kolpackov <[email protected]>; 
bug-make <[email protected]>
Subject: Re: [bug #60538] Environment variable overrides explicit assignment

***** EXTERNAL EMAIL *****
Most likely he thinks/thought that since there are two different make processes 
with a python process in between the command line override wouldn't leak to the 
child make. But (from the manual):

> Likewise variables defined on the command line are passed to the sub-make 
> through MAKEFLAGS. (5.7.3)

> The special variable MAKEFLAGS is always exported (unless you unexport it). 
> (5.7.2)

The manual doesn't actually say that MAKEOVERRIDES is exported like MAKEFLAGS 
but I assume it is.

On Thu, May 6, 2021 at 9:07 AM Paul D. Smith 
<[email protected]<mailto:[email protected]>> wrote:
Update of bug #60538 (project make):

                  Status:                    None => Not A Bug
             Open/Closed:                    Open => Closed

    _______________________________________________________

Follow-up Comment #5:

As Martin says, if the variable is set ON THE COMMAND LINE, it will absolutely
take precedence over the setting in a makefile variable (unless overridden
with override).

But, you said you has set this IN THE ENVIRONMENT which is very different;
values set in the environment should not take precedence over values set in
the makefile (as long as -e is not set).

So, you'll have to investigate why/how this variable assignment is appearing
in your command line (in MAKEFLAGS).

I'm going to close this; you can continue to post here but better would be to
discuss on the mailing list, until/unless we discover a bug.

Cheers!

    _______________________________________________________

Reply to this item at:

  
<https://savannah.gnu.org/bugs/?60538<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsavannah.gnu.org%2Fbugs%2F%3F60538&data=04%7C01%7CMartin.Dorey%40hitachivantara.com%7C4d8dfa6682a04aa6c9ce08d910aed969%7C18791e1761594f52a8d4de814ca8284a%7C0%7C0%7C637559165429414808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Epuq%2B8xuDnGnmDZ4kueVHdz3w3bziqH4DPr%2Bi7mbVsM%3D&reserved=0>>

_______________________________________________
  Message sent via Savannah
  
https://savannah.gnu.org/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsavannah.gnu.org%2F&data=04%7C01%7CMartin.Dorey%40hitachivantara.com%7C4d8dfa6682a04aa6c9ce08d910aed969%7C18791e1761594f52a8d4de814ca8284a%7C0%7C0%7C637559165429424798%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=q%2B8IX8S1cjP7hffo8KaRNxTLqKKSjaSXdBc1438L%2FaQ%3D&reserved=0>


Reply via email to