mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user