bug-make
[Top][All Lists]
Advanced

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

Re: Bug#119663: make: shell function calls within rule commands are


From: Paul D. Smith
Subject: Re: Bug#119663: make: shell function calls within rule commands are expanded too early
Date: Sun, 18 Nov 2001 14:07:25 -0500

%% Manoj Srivastava <address@hidden> 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 <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]