diff options
Diffstat (limited to 'mk/functions.mk')
-rw-r--r-- | mk/functions.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mk/functions.mk b/mk/functions.mk new file mode 100644 index 000000000000..51f6457016e7 --- /dev/null +++ b/mk/functions.mk @@ -0,0 +1,7 @@ +# 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)) + +# Given a file name, produce the corresponding dependency file +# (e.g. ‘foo/bar.o’ becomes ‘foo/.bar.o.dep’). +filename-to-dep = $(dir $1).$(notdir $1).dep |