%% Manoj Srivastava <[EMAIL PROTECTED]> writes:

  ms> The info documentation for the 'shell' function includes the following
  ms> paragraph:

  ms>      The commands run by calls to the `shell' function are run when the
  ms>   function calls are expanded.  In most cases, this is when the makefile
  ms>   is read in.  The exception is that function calls in the commands of
  ms>   the rules are expanded when the commands are run, and this applies to
  ms>   `shell' function calls like all others.

  ms> However, this exception does not appear to be true in at least the
  ms> current version of make.

Yes, it is.

  ms>  I think the documentation needs to be clarified to explain this
  ms>  behaviour (perhaps the shell functions are executed at the
  ms>  beginning of the command group,

This is what happens.  When make gets ready to build a target, it
evaluates all the commands needed to build that target at once, before
the first line is invoked.

I guess the paragraph you quote above could be clarified.  Actually the
whole paragraph seems poorly written; I'll probably just remove it and
refer people to the section on expansion.

Thx.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to