Re: Expansion of $(eval..)

2022-01-22 Thread Gisle Vanem
Paul Smith wrote: You probably want to escape the non-argument references, so that call will not run them and instead they will be passed to eval: define add_c_src VPATH += $(1) C_SRC += $$(addprefix $(1)/, $(2)) $$(info Number of 'C_SRC': $$(words $$(C_SRC))) endef

Re: Expansion of $(eval..)

2022-01-22 Thread Paul Smith
s: $(info ...) and inside that you have $(call ...). Since $(call ...) is the inner function it's expanded first. That means the "first level" of expansion happens before eval is invoked, and the variable is simply expanded as a text string with no knowledge of makefile con

Expansion of $(eval..)

2022-01-22 Thread Gisle Vanem
Hello list! I have this really large makefile and discovered the '$(eval..)' function was handy to use for this. Like: define add_c_src VPATH += $(1) C_SRC += $(addprefix $(1)/, $(2)) $(info Number of 'C_SRC': $(words $(C_SRC))) endef $(eval $(call add_c_src, frmts/ceos,

$(eval) expansion within $(eval)

2008-04-15 Thread Tony Strauss
Calling $(eval) within $(eval) can lead to very unintuitive (at least to me :) behavior. In particular, the inner $(eval) is expanded *and* executed during the expansion of the outer $(eval). For instance (I've also attached this example, since my email client mangled the tabs in the code

Re: $(eval) expansion within $(eval)

2008-04-15 Thread Philip Guenther
On Tue, Apr 15, 2008 at 2:47 PM, Tony Strauss [EMAIL PROTECTED] wrote: Calling $(eval) within $(eval) can lead to very unintuitive (at least to me :) behavior. In particular, the inner $(eval) is expanded *and* executed during the expansion of the outer $(eval). Right, because make needs to