From 99ed25accfd968003d3b0d294720828a1348ce47 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Dec 2013 15:01:14 +0100 Subject: Add a function for doing recursive wildcard searches Source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html --- mk/lib.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mk') diff --git a/mk/lib.mk b/mk/lib.mk index cec4eee1f..1d2f05162 100644 --- a/mk/lib.mk +++ b/mk/lib.mk @@ -40,6 +40,11 @@ ifeq ($(BUILD_DEBUG), 1) 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/dist.mk include mk/install.mk -- cgit v1.2.3