bug-make
[Top][All Lists]
Advanced

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

Re: exported vs command line variables


From: Paul Smith
Subject: Re: exported vs command line variables
Date: Fri, 23 Sep 2016 14:23:15 -0400

On Fri, 2016-09-23 at 05:52 -0700, David Boyce wrote:
> I still think that's a good plan, except that now I find out it ends
> up exporting anyway. I'm sure it's too late to change now but is
> there a reason for this (unfortunate IMHO) behavior?

I can't tell you: this behavior has existed since the very first import
of GNU make code into source code control, back in 1991.

I couldn't find anything directly about this in the POSIX spec itself
but in the Rationale it says:

> Macros are not exported to the environment of commands to be run.
> This was never the case in any historical make and would have serious
> consequences. The environment is the same as the environment to make
> except that MAKEFLAGS and macros defined on the make command line are
> added.

The last sentence seems to imply that POSIX requires this behavior but
as I say, I can't find a justification for this in the text.



reply via email to

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