曲径通幽论坛

标题: subst 函数 -- 字符串替换 [打印本页]

作者: beyes    时间: 2011-1-29 10:06
标题: subst 函数 -- 字符串替换
语法
$(subst <from>,<to>,<text>)

说明
将 <text> 中的 <from> 字符串替换为 <to> 。

示例代码
[Plain Text] 纯文本查看 复制代码
text := "i have a dream"

all:
        @echo "$(subst i,you,$(text))"


运行输出
$ make
you have a dream





欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2