help-make
[Top][All Lists]
Advanced

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

Re: want to clarify ways to "export" a make variable


From: Robert P. J. Day
Subject: Re: want to clarify ways to "export" a make variable
Date: Mon, 20 Apr 2015 09:01:18 -0400 (EDT)
User-agent: Alpine 2.11 (LFD 23 2013-08-11)

On Mon, 20 Apr 2015, Paul Smith wrote:

> On Mon, 2015-04-20 at 07:08 -0400, Robert P. J. Day wrote:

> >   finally, if i change the origin of the variable to:
> >
> >   $ make VAR=value ...
> >
> > is that variable still part of the environment?
>
> Yes.  See the GNU make manual "Communicating variables to sub-makes":
>
>         Except by explicit request, `make' exports a variable only if it
>         is either defined in the environment initially or set on the
>         command line, and if its name consists only of letters, numbers,
>         and underscores.

  the only part of the above i once read that initially confused me
was "or set on the command line" since one could interpret the
following:

  $ VAR=value make ...

as setting VAR on the command line, but i'm assuming that in the
context of make, setting "on the command line" *specifically* means:

  $ make VAR=value ...

correct?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



reply via email to

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