help-make
[Top][All Lists]
Advanced

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

RE: clarification of deferred function expansion


From: Paul D. Smith
Subject: RE: clarification of deferred function expansion
Date: Fri, 5 Apr 2002 00:03:33 -0500

%% "Asperheim, Eric" <address@hidden> writes:

  ae> Your explanation was very helpful in helping me to better
  ae> understand what is done and when things are done during the
  ae> "second phase" of gmake. This also brings up a point which you may
  ae> have heard. The gmake doc doesn't use examples in some cases to
  ae> clarify it's functionality - this being a perfect example. I've
  ae> read about 1st/2nd phase of gmake. But, I still wasn't sure when
  ae> the $(shell function expansion would occur - when I thought or
  ae> what you described.

There is no difference between expansion of variables and functions,
including but not limited to the shell function.  Functions are just a
special kind of variable.  Put another way, you could replace any
function with a variable and, from an expansion standpoint, the behavior
would be identical.


Certainly make must expand the contents of the command script before it
can invoke the command script... how can it pass the command to the
shell to be run before it knows what command to pass?

I will look at that section and see if it can better detail how command
scripts are expanded.

Thx.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]