bug-make
[Top][All Lists]
Advanced

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

[bug #44308] combination of $(call ...) and $(value ...) functions


From: Paul D. Smith
Subject: [bug #44308] combination of $(call ...) and $(value ...) functions
Date: Fri, 20 Feb 2015 19:29:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36

Follow-up Comment #1, bug #44308 (project make):

This is an interesting idea.  I have the following concerns:

A small one: you should handle ${1} and $(1) as well as simple $1 (etc.)  Also
you'll probably get measurable speedup using switch statements instead of
if/else, for any makefile that uses this function extensively.

A larger one: it forces an unpleasant co-dependency between the way you write
the variable and which function you use to expand it.  In other words, if you
take a variable written to be used with $(call ...) and invoke it with $(callv
...) instead, it will break.  Similarly if you take a variable written to be
used with $(callv ...) and invoke it with $(call ...) instead, it will break. 
I don't like that: too much action at a distance and opportunities for
breakage.

It seems like it would be better to figure out a way to make the method of
expansion be a feature of the _variable_, rather than of the function used, so
that using $(call ...) would do the right thing on both "styles" of function
definition.  However I admit that offhand I'm not coming up with a nice way to
do this.  And of course this would require changes to base GNU make; it can't
be done with just custom function creation.

Hm.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44308>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]