bug-make
[Top][All Lists]
Advanced

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

Re: [PATCH] pattern-specific variable expansion


From: Paul D. Smith
Subject: Re: [PATCH] pattern-specific variable expansion
Date: Mon, 19 Apr 2004 17:48:31 -0400

%% Noel Yap <address@hidden> writes:

  ny> Hmmm, I ran into something similar in which:
  ny> a := A

  ny> bar:
  ny>   @echo $a

  ny> a := B

  ny> would output B.

Of course.  As expected.

Command scripts are not expanded until they are about to be invoked by
make, which is well after all the makefiles are read in.  By that time
the value of the variable "a" IS "B".

Check the GNU make manual chapter "How 'make' Reads a Makefile".

  ny> Does this patch fix this as well?

It doesn't, and shouldn't, because the above behavior is defined by
POSIX and required of every program that calls itself "make".

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