I'm trying to filter out strings that contain a particular character, but it doesn't work. I guess make
does not support multiple %
patterns?
.PHONY: test
test:
echo $(filter-out %g%, seven eight nine ten)
Gives:
$ make test
echo seven eight nine ten
seven eight nine ten
It doesn't filter out "eight"? Actually what I want to do is filter out from a list of filenames those containing "$". (In a Java context.)
Any hope, or do I have to use $(shell)
?
Thanks.
Does the following function meet the purpose?
FILTER_OUT = $(foreach v,$(2),$(if $(findstring $(1),$(v)),,$(v)))
$(call FILTER_OUT,g, seven eight nine ten)