调试makefile—subst函数

操作系统:ubuntu10.04

Makefile里的subst
用法是$(subst FROM,TO,TEXT),即将TEXT中的东西从FROM变为TO

Makefile中的字符串处理函数
格式:
    $(subst ;,;,;)
名称:字符串替换函数——subst。
功能:把字串;中的;字符串替换成;。
返回:函数返回被替换过后的字符串。

示例:
$(subst a,the,There is a big tree),
把“There is a big tree”中的“a”替换成“the”,返回结果是“There is the big tree”。


参考文件:
1,http://baike.baidu.com/link?url=Wibqapwq_2NmeBkVyaIGAUKL7UT94Ad5XuMZQv5jI7zXI_7XWlXj_35adankhh4p

原文地址:https://www.cnblogs.com/lidabo/p/4628868.html