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

re: the example I just uploaded ... my comment was poorly worded.  I re-wrote
it to look more like the functions in "function.c" in the make source --
though I wasn't sure what to use in place of gmk_expand.

Another useful one would be a variant of $(call ...); for lack of a better
name I'll refer to it as $(call_noexpand, ...).  As the name implies, the
arguments are not automatically expanded.

I have macros written of the form:

ifeq 'undefined' '$(origin somevariable)'
IFBLAH = $(strip $(1))
else
IFBLAH = $(strip $(2))
endif

... where, in a makefile you'd use it as:

$(call IFBLAH, <true>, <false>)

I had attempted to use these macros to generate build warnings/errors like
this:

$(call IFBLAH,,$(error Not ok to do this))

... but because func_call is marked to expand parameters before the call is
made, this causes the $(error) to be generated always, not just on the false
condition.

An alternate version of $(call ...) would be quite helpful for that purpose.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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