建立函数:
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))点击复制复制失败已复制
用法:
- 获取当前文件夹下所有的
C
文件:
$(call rwildcard,.,*.c)点击复制复制失败已复制
- 获取
src
文件夹下的所有C
文件和h
文件:
$(call rwildcard,src,*.c *.h)