There are so many examples with redundant uses of wildcard
$(findstring
Use the "wildcard" function:
$(wildcard *.h)
EDIT: in order to match a specific list, do$(wildcard $(HEADER_FILES))
There is no need to use $(filter ...), the wildcard function automatically filters files which don't exist.ifeq ($(wildcard $(HEADER_FILES)), )
# This will stop the make trying to resolve HEADER_FILES for echo :)
echo "ERROR: $(HEADER_FILES)"
else
# File exists, continue or do something else...
endif