[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tricky problem filtering out commas from a string.
From: |
Dave Korn |
Subject: |
Tricky problem filtering out commas from a string. |
Date: |
Thu, 19 Apr 2007 13:15:26 +0100 |
Hey everybody, has anyone else had to try and do this before?
--------------------begin comma.mk--------------------
LIST_WITH_COMMAS:= foo, bar, baz, quux
LIST_WITHOUT_COMMAS:=$(filter-out \,,$(LIST_WITH_COMMAS))
$(warning $(LIST_WITHOUT_COMMAS))
LIST2_WITHOUT_COMMAS:=$(subst \,, ,$(LIST_WITH_COMMAS))
$(warning $(LIST2_WITHOUT_COMMAS))
all:
@
--------------------end comma.mk--------------------
The obvious first approach - escape the comma so that filter-out doesn't
think it's the separator between its two arguments - just doesn't work. I
can't quite see how to achieve this in make....
cheers,
DaveK
--
Can't think of a witty .sigline today....
- Tricky problem filtering out commas from a string.,
Dave Korn <=