data/method/lib/README.md

13 lines
593 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

makefile 常用函数
示例在test下建立a.c和b.c2个文件在sub目录下建立sa.c和sb.c 2个文件
cd test/
1.wildcard
${info "${wildcard ./*.c ./sub/*.c}"} #输出匹配到的包含目录的文件a.c b.c sub/sa.c sub/sb.c
2.notdir
${info "${notdir ${wildcard ./*.c ./sub/*.c}}"} #输出去除目录的文件,a.c b.c sa.c sb.c
3.patsubst
${info "${patsubst %.c,%.o,${notdir ${wildcard ./*.c ./sub/*.c}}}"} #输出a.o b.o sa.o sb.o
4.filter
${info "${filter %.c,${wildcard ./*.c ./sub/*.c}"}} #输出匹配到的包含目录的文件a.c b.c sub/sa.c sub/sb.c