tools/Config.mk: Move the RWILDCARD function definition from apps/builtin/Makefile to nuttx/tools/Config.mk. It may have a broader usage than it does now.

This commit is contained in:
Gregory Nutt
2018-08-15 18:45:39 -06:00
parent 96f05c895d
commit aeda17318d
+14
View File
@@ -269,6 +269,7 @@ endef
endif
# CATFILE - Cat and append a list of files
#
# USAGE: $(call CATFILE,dest,src1,src2,src3,...)
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
@@ -281,6 +282,19 @@ define CATFILE
endef
endif
# RWILDCARD - Recursive wildcard used to get lists of files from directories
#
# USAGE: FILELIST = $(call RWILDCARD,<dir>,<wildcard-filename)
#
# This is functionally equivent to the fillowing, but has the advantage in
# that it is portable
#
# FILELIST = ${shell find <dir> -name <wildcard-file>}
define RWILDCARD
$(foreach d,$(wildcard $1/*),$(call RWILDCARD,$d/)$(filter $(subst *,%,$2),$d))
endef
# CLEAN - Default clean target
ifeq ($(CONFIG_WINDOWS_NATIVE),y)