bug-make
[Top][All Lists]
Advanced

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

Re: problem with 'make' program -C option


From: Paul D. Smith
Subject: Re: problem with 'make' program -C option
Date: Fri, 11 Nov 2005 00:52:42 -0500

%% "vivek" <address@hidden> writes:

  v> When 'make' program is invoked with -C option, then it decends into
  v> that directory but the 'PWD' variable still refers to the path from
  v> where the 'make' was invoked rather than the path of the directory
  v> it decends into.

PWD is not a variable that make manages.  If you see it in your
makefile, it's because your shell had it set in its environment and
exported it before make was invoked.

Make will simply use/pass down the value it had when make was invoked,
or any overriding value it was given in your makefile.  But, it won't
manage that value itself.


You can check the CURDIR variable if you like.

-- 
-------------------------------------------------------------------------------
 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]