On Fri, 2008-08-01 at 16:57 -0400, Yang Zhang wrote:
> Hi, if I have "xs := a b c", how do I get "a:b:c"?
You need to use "subst" on spaces. But, it's tricky to do this; there's
no good way to "escape" a space inside a function argument.
However, you can hide anything from make's function parsing by putting
it inside a variable, since make chops up the arguments BEFORE it
expands anything.
Getting a space into a variable is ALSO a little tricky. Do this:
# make an empty variable
E =
# Make a variable containing exactly one space:
S = $(E) $(E)
# now you can subst:
$(subst $(S),:,$(xs))
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make