help-make
[Top][All Lists]
Advanced

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

Re: $(value) of function parameters


From: Paul D. Smith
Subject: Re: $(value) of function parameters
Date: Fri, 4 Jun 2004 13:27:28 -0400

%% Noel Yap <address@hidden> writes:

  ny> It seems that $(value) doesn't work for function parameters:

  ny> $ cat GNUmakefile

  ny> fn = $(value 1)
  ny> v = $
  ny> $(warning $(value v))
  ny> $(warning $(call fn,$))

  ny> $ gmake
  ny> GNUmakefile:4: $
  ny> GNUmakefile:5:

The problem is that the arguments to $(call ...) are themselves
evaluated before being passed to the function.  So, your '$' is being
expanded before fn gets it.  Try this:

    $(warning $(call fn,$$))

-- 
-------------------------------------------------------------------------------
 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]