[Top][All Lists]

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

Re: problem in $(call ...) [func_call()]

From: Paul D. Smith
Subject: Re: problem in $(call ...) [func_call()]
Date: Sun, 8 Jan 2006 17:36:41 -0500

%% Anand Avati <address@hidden> writes:

  aa> i do read a changelog entry in 2002-04-28 telling that exp_count
  aa> contains max number of recursive calls allowed. but i do not
  aa> understand why $(CMD) gets set with exp_count=0 while $(call CMD)
  aa> gets set with exp_count=EXP_COUNT_MAX.. shouldnt their expansion
  aa> principles be the same?

No.  $(call) functions can be recursive; in fact, some of the most
useful invocations of call are recursive.

  aa> i am assuming the difference could be, for call, $1 could contain
  aa> the CMD again, or something like that?

Sometimes; usually its the function definition that calls itself

  aa> even if exp_count > 0 is needed, EXP_COUNT_MAX is proving to be
  aa> too big a value.  I re-built make with setting exp_count=0 in
  aa> func_call(), in the place where it was being set to EXP_COUNT_MAX
  aa> [diff attached], and i found all the test cases i could build,
  aa> worked.. do we really need exp_count > 0 there? could you show me
  aa> an example Makefile where exp_count=<arbitrary number> `works' or
  aa> `helps'.

If you look at the test suite in the functions/call test, the first one
will fail if you set this to 0.

 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]