[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concatenating word lists in GNU make
From: |
Paul D. Smith |
Subject: |
Re: Concatenating word lists in GNU make |
Date: |
Fri, 6 Oct 2000 14:31:09 -0400 |
%% Chad Loder <address@hidden> writes:
cl> CLASSPATH=/c/foo.jar /c/bar.jar
cl> Needs to be joined into:
cl> /c/foo.jar:/c/bar.jar
E = # empty
S = $E $E# space
PATH = $(subst $S,:,$(CLASSPATH))
cl> P.S. - Also, is there a way to accomplish the reverse? In other
cl> words, tokenizing a string into a wordlist based on 1 or more
cl> token characters? Maybe make needs "explode" and "implode" functions
cl> like they have in other macro languages.
Subst does that, too.
CLASSPATH = $(subst :, ,$(PATH))
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist