help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add comma between strings?


From: Philip Guenther
Subject: Re: How to add comma between strings?
Date: Tue, 18 May 2010 15:32:43 -0700

On Tue, May 18, 2010 at 3:22 PM, Paul Smith <address@hidden> wrote:
> On Tue, 2010-05-18 at 16:48 -0500, Peng Yu wrote:
>> TXT=a b c
>>
>> I have the above variable. I want convert $(TXT) to the string "a,b,c"
>> (without the quote). Would you please let me know if it is possible in
>> make?
>
> Something like:
>
>        EMPTY :=
>        SPACE := $(EMPTY) $(EMPTY)
>        COMMA := ,
>
>        TXT = a b c
>        NEW = $(subst $(SPACE),$(COMMA),$(TXT))

...which is almost a direct quote from the GNU make info pages.  Peng,
do you have access to the info pages?  Try running
    info make
or
    info 'gnu make'

and see if either gives you access to the documentation.  It seems
that most of the questions that you've asked here are answered
directly by that documentation.  Are you unable to access that
documentation?


Philip Guenther



reply via email to

[Prev in Thread] Current Thread [Next in Thread]