美文网首页
makefile之findstring函数

makefile之findstring函数

作者: frank_545b | 来源:发表于2018-09-17 15:52 被阅读0次
#$(findstring <find>,<in> )
#功能:在字串<in>中查找<find>字串。
#返回:如果找到,那么返回<find>,否则返回空字符串。

str1 := a b c
str2 := b c

#第一个函数返回“a”字符串,第二个返回空字符串
all:
    @echo $(findstring a,$(str1))
    @echo $(findstring a,$(str2))

相关文章

网友评论

      本文标题:makefile之findstring函数

      本文链接:https://www.haomeiwen.com/subject/ngxrnftx.html