song0071000 发表于 2013-12-27 11:49

makefile中 filter-out某个模式的字符串

有这样的变量
FILE:= a.c b.c c.c d.c ax.c bx.c cx.c
然后调用filter-out
FILE:=$(filter-out %x.c,$(FILE))

这样好像并不能把所有的 以x.c结尾的文件去除掉啊?
FILE:=$(filter-out *x.c,$(FILE)) 也不行啊
makefile中的模式配置和shell的不一样?

怎么样才能将FILE变量中的x.c结尾的文件去除掉?

song0071000 发表于 2013-12-27 11:58

这是可以的
:em17:
弄错了
makefile比较长 估计是别处出错了
单独测试 是可以的。。。
页: [1]
查看完整版本: makefile中 filter-out某个模式的字符串