aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-18 15:01:14 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-18 15:01:14 +0100
commit99ed25accfd968003d3b0d294720828a1348ce47 (patch)
tree3cad809c71c53e7e0f29e62ced10cc4cb8decfb2 /mk
parent088552b319d8f5896e6cfd6a8e449b4239696ea2 (diff)
Add a function for doing recursive wildcard searches
Source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
Diffstat (limited to 'mk')
-rw-r--r--mk/lib.mk5
1 files changed, 5 insertions, 0 deletions
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