When I define a custom function in a Makefile, like this
define add_target
${1}: ${2} ${3}
endef
How can I get a list of all arguments, that have been provided to $(call add_target, ...)?
So this $(call add_target, A, B) will be expanded to A: B
and this $(call add_target, A, B, C, D) will be expanded to A: B C D
GNU manual only says that
When make expands this function, it assigns each param to temporary variables $(1), $(2), etc. The variable $(0) will contain variable. There is no maximum number of parameter arguments.
but nothing about how to get all params.