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
On Sat, 2022-01-22 at 13:59 +0100, Gisle Vanem wrote:
>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, ceosopen.c))
>$(eval $(call add_c_src, frmts/ce
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, ceoso