help-make
[Top][All Lists]
Advanced

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

$(filter-out $(pattern),$(aList)) doesn't work with '%' in $(pattern)


From: gk
Subject: $(filter-out $(pattern),$(aList)) doesn't work with '%' in $(pattern)
Date: Mon, 17 Feb 2003 18:57:19 -0800

I have used variable filter_out_pattern for convenience only; results are the same if you use $(patsubst %,%/\%,$(subDir)) instead.

# Makefile

dirs:=/dir1 /dir1/dir2
subDir:= /dir1
filter_out_pattern:=$(patsubst %,%/\%,$(subDir))

foo:
        @echo dirs=$(dirs)
        @echo filter_out_pattern=$(filter_out_pattern)
@echo after filtering: dirs=$(filter-out $(filter_out_pattern),$(dirs))
        @echo should be: dirs=$(filter-out /dir1/%,$(dirs))


#eof

address@hidden junk]$ make
dirs=/dir1 /dir1/dir2
filter_out_pattern=/dir1/%
after filtering: dirs=/dir1 /dir1/dir2
should be: dirs=/dir1


- Greg Keraunen
http://www.xmake.org





reply via email to

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