[Top][All Lists]

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

Re: problem with nested $(call ...) inside $(eval $(call ...)

From: Paul D. Smith
Subject: Re: problem with nested $(call ...) inside $(eval $(call ...)
Date: Wed, 20 Nov 2002 15:16:09 -0500

%% gk <address@hidden> writes:

  g> I am having trouble understanding why the following macro 'rule2'
  g> is not evaluating the way I expect.  Is this a bug? In what order
  g> are nested $(call ...) statements evaluated?  Thanks for any
  g> insights.

This has nothing to do with call, or order of evaluation, or anything
like that.  The problem is much simpler.

The word function takes two arguments, and you're only passing it one:

  g> echo hello $(call word,$(1))

Just like the error says:

  g> Makefile:22: *** Insufficient number of arguments (1) to function `word'.  

See the GNU make manual description of the "word" function.

Replace your call invocation with something that passes two arguments,
like this:

  echo hello $(call word,1,$(1))

and it will work.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "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]