help-make
[Top][All Lists]
Advanced

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

Re: variable number of arguments to functions


From: Paul D. Smith
Subject: Re: variable number of arguments to functions
Date: Sun, 9 Nov 2003 17:55:01 -0500

%% Noel Yap <address@hidden> writes:

  ny> Is there a way for me to write a function that has no maximum
  ny> number of arguments?  For example, I'd like to be able to do:

  ny>   $(call exec-commands,echo bar, ls foo)
  ny>   $(call exec-commands,echo another, ls this, ls that)
  ny>   $(call exec-commands,echo one more, ls aoeu, ls ueoa, ls snth)

I don't think so.  A user-defined function can take as many arguments as
you like, up to the limits of memory.  However, I can't think of any way
to write the function itself, because there's no way to specify "all the
arguments to this function".

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