Makefile 里的 subst 函数
来源:互联网 发布:网络社交软件盈利 编辑:程序博客网 时间:2024/06/03 17:36
在Makefile中可以使用函数来处理变量。函数的返回值可以当做变量来使用。
一、函数的调用语法
函数调用,很像变量的使用,也是以“$”来标识的,其语法为:$( )或${ }。
参数间以逗号分隔,函数名和参数间以空格分隔。函数调用以“$”开头,以圆括号或花括号把函数名和参数括起。
$(subst FROM, TO, TEXT),即将字符串TEXT中的子串FROM变为TO。
示例:
TARGETS=111.cpp 222.cpp 333.cpp
OTARGETS=$(subst cpp,o,$(TARGETS))
LTARGETS=$(subst cpp,lo,$(TARGETS))
%.o: %.cpp
g++ -c -o $@ $<
all: objs libs
阅读全文
0 0
- Makefile 里的 subst 函数
- Makefile 里的 subst 函数
- Makefile 里的 subst 函数
- Makefile 里的 subst 函数
- Makefile 里的 subst 函数
- Makefile之subst 函数
- Makefile文件字符串处理函数subst使用
- Makefile 中subst、foreach、wildcard、notdir函数
- makefile 里的 eval 函数
- makefile 里的 eval 函数 .
- makefile教程subst
- subst 的使用
- subst
- subst
- subst
- Makefile里的PHONY
- android里的makefile
- dos命令subst的妙用
- Java实现-反转整数
- Dijkstra求单源最短路模板
- codeforce 871D Imbalanced Array
- Codeforces 821 E. Okabe and El Psy Kongroo
- 【Codeforces Round #419 (Div. 1)】Codeforces 815C Karen and Supermarket
- Makefile 里的 subst 函数
- 解决mysql闪退问题
- Android开发艺术探索阅后提炼
- git ssh出错
- 购物单
- 一分钟了解“查期刊的SCI分区”
- Ubuntu搭建svn服务器
- git提交至远程仓库步骤
- IntelliJ IDEA2017 构建nwjs项目