I created a macro for use in makefiles along the lines of:
TODO_MSG = $(warning TODO: $(1))
$(call TODO_MSG, This part of the msg displays fine, but this part does not)
I can get around it with something like the following:
BLAH := $(shell perl -e 'print join( " ", 2..200 )'
COMMA := ,
TODO_MSG = $(warning TODO:$(1)$(strip $(foreach x,${BLAH},$(if $(${x}),${COMMA}$(${x}))))
… but I’m curious whether there is anything offering more explicit support for variadic macros.
Here is a remix on Beta’s solution:
If there was an $(identity …) function for Make, I’d use that; $(strip …) was the closest I could find.