问题
Lets say you filter for cpp files like so
$(wildcard **/*.cpp)
But you don't want files that contain the word foo and you don't want the file with the exact name bar.cpp
How does one use filter-out with multiple criteria?
回答1:
This seems to work. Also recursively.
$(filter-out $(wildcard **/bar.cpp) $(wildcard **/*foo*), $(wildcard **/*.cpp))
Please also note Etan's simpler suggestion below. Leaving mine only for completeness.
来源:https://stackoverflow.com/questions/36719876/how-to-filter-out-files-with-multiple-criteria-in-a-makefile