Functions For Transforming Text

Posted by Beetle B. on Tue 03 September 2019

A function call can be either

$(FUNCTION ARGUMENTS)

or

${FUNCTION ARGUMENTS}

If one of your arguments needs to have a comma or a brace, put it in via variable substitution.

comma:= ,
empty:=
space:= $(empty) $(empty)
foo:= a b c
bar:= $(subst $(space),$(comma),$(foo))
# bar is now 'a,b,c'.

tags : make