help-make
[Top][All Lists]
Advanced

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

Re: verifying what constitutes an "environment variable"


From: Paul D. Smith
Subject: Re: verifying what constitutes an "environment variable"
Date: Sun, 2 Jan 2005 20:31:26 -0500

%% "Robert P. J. Day" <address@hidden> writes:


  rpjd> based on testing, there are four ways i can set an env var that
  rpjd> will automatically be passed to a further make invocation:

  rpjd>   1) part of my linux shell environment
  rpjd>   2) $ VAR=value make ...

These first two are identical.

  rpjd>   3) $ make VAR=value ...
  rpjd>   4) in the makefile, "export VAR = value"

There are various options for exporting make variables from within a
makefile, but they're equivalent.

  rpjd> i realize there are some subtle differences in the above choices
  rpjd> but, basically, do they all fit the definition of an
  rpjd> "environment variable"?

They all cause any program invoked by make, even another instance of
make, to inherit the value of VAR through the environment, yes.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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