> You may find this trick from my blog to be helpful: >  >>  > 
http://make.mad-scientist.net/deferred-simple-variable-expansion/
Would it be possible to encapsulate it somehow, so that other people 
immediately know what is going on?

I mean something like this:


# This definition does this because of that...

define DeferredSimpleVariableExpansion =

  ... something complicated here like this ...

  OUTPUT = $(eval OUTPUT := $$(shell some-comand))$(OUTPUT)

endef


Then the makefile user only has to do this:


$(call DeferredSimpleVariableExpansion VARIABLE some shell command with some 
arguments)


The name of the function is enough of a hint, and if not, the function 
definition has some advanced explanation.

Thanks in advance,
  rdiez

Reply via email to