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/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to