Chinaunix

标题: makefile中 filter-out某个模式的字符串 [打印本页]

作者: 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
这是可以的

弄错了
makefile比较长 估计是别处出错了
单独测试 是可以的。。。





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2