help-make
[Top][All Lists]
Advanced

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

Re: a couple more questions about variables and scope


From: Tristan Van Berkom
Subject: Re: a couple more questions about variables and scope
Date: Wed, 09 Jun 2004 10:55:18 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Robert P. J. Day wrote:
[...]
exactly. :-)  one more piece of clarification.  in section 6.9, i read:

  "Every environment variable that make sees when it starts up is
  transformed into a make variable with the same name and value."

so this means, then, that there is no effective difference between getting an environment variable from a caller, and creating (and exporting) a variable within a makefile? would it be more technically correct to rephrase the sentence above by appending "... and then exported"? since if you just assign a value to a variable, that will *not* be available to sub-makes unless you export it first.

am i making sense?  there's only decaf left here.  grrr ...

    Note that variables assigned through the environment are "assigned" before
your makefiles assign variables (so makefile assignments "override" the
environment), but variables assigned on the command line
(i.e. make DEBUG=true all) override variables assigned inside the makefiles
except ofcourse if you use the keyword "override" in your makefile

Cheers,
                                 -Tristan

/me wipes the sweat from my brow





reply via email to

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