1 # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions 2 comma:= , 3 empty:= 4 space:= $(empty) $(empty) 5 foo:= a b c 6 bar:= $(subst $(space),$(comma),$(foo)) 7 # bar is now `a,b,c' 8 9 test: 10 echo $(bar) 11 echo $(subst ,repl,str) 12