about summary refs log tree commit diff
path: root/mk
diff options
context:
space:
mode:
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 cec4eee1fd17..1d2f05162812 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