help-make
[Top][All Lists]
Advanced

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

Re: how to (correctly) modify GNU Make so that separate shell is always


From: Paul Smith
Subject: Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command
Date: Sat, 16 Apr 2016 10:01:17 -0400

On Sat, 2016-04-16 at 05:16 +0000, Mark Galeck wrote:
> I guess you are saying that in fact the Make statement
> 
> export VAR-Y := val
> 
> (attempts to) establish a shell (environment) variable, and is not
> merely a Make construct. Is that what you are saying?

Yes, that's what the "export" keyword does: it tells make to put the
variable into the environment when it invokes a command as part of a
recipe.  See the GNU make manual:

http://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html

The only ways for one program to pass information to another program in
UNIX are through the command line and through the environment (unless
you want to use more complex and non-portable methods such as shared
memory etc.)  The export keyword tells make to put the variable into the
environment.



reply via email to

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