Add a function for doing recursive wildcard searches

Source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
This commit is contained in:
Eelco Dolstra 2013-12-18 15:01:14 +01:00
parent 088552b319
commit 99ed25accf

View file

@ -40,6 +40,11 @@ ifeq ($(BUILD_DEBUG), 1)
endif endif
# Utility function for recursively finding files, e.g.
# $(call rwildcard, path/to/dir, *.c *.h).
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
include mk/clean.mk include mk/clean.mk
include mk/dist.mk include mk/dist.mk
include mk/install.mk include mk/install.mk