Hi all,
What is the proper way to insert commas into each word of a GNU Make
variable?
I want to change FOO something like this:
FOO := a b c d e
FOO := $(patsubst %,-Wl,-y,%_,$(FOO))
to get
-Wl,-y,a_ -Wl,-y,b_ -Wl,-y,c_ -Wl,-y,d_ -Wl,-y,e_
Somehow I need to comment the comma
Ted Stern [EMAIL PROTECTED] writes:
Hi all,
Your post belongs to help-make, not bug-make.
What is the proper way to insert commas into each word of a GNU Make
variable?
I want to change FOO something like this:
FOO := a b c d e
FOO := $(patsubst %,-Wl,-y,%_,$(FOO))
to get
On 12 Jul 2005 at 10:14 UTC-0700, Ted Stern wrote:
Hi all,
What is the proper way to insert commas into each word of a GNU Make
variable?
I want to change FOO something like this:
FOO := a b c d e
FOO := $(patsubst %,-Wl,-y,%_,$(FOO))
to get
-Wl,-y,a_ -Wl,-y,b_
Put it into a variable:
, = ,
$(patsubst %,-Wl$,-y,%_,$(FOO))
If that's too tricky, just use a variable like COMMA or something :-).
All GNU make functions parse up the arguments to the function BEFORE any
evaluation of the arguments happens.
--