makefile 里面 := 和 = 的区别
2015-05-29 13:32
246 查看
Makefile 文件里面
用 :=,表示变量赋值的时候立刻展开。
用 =,表示变量被用的时候才展开。
下面是例子:
animal=frog
var="$(animal) dog cat"
animal=hello
test:
@echo $(var)
#输出结果是:
#hello dog cat
animal=frog
var:="$(animal) dog cat"
animal=hello
test:
@echo $(var)
#输出结果是:
#frog dog cat
用 :=,表示变量赋值的时候立刻展开。
用 =,表示变量被用的时候才展开。
下面是例子:
animal=frog
var="$(animal) dog cat"
animal=hello
test:
@echo $(var)
#输出结果是:
#hello dog cat
animal=frog
var:="$(animal) dog cat"
animal=hello
test:
@echo $(var)
#输出结果是:
#frog dog cat
相关文章推荐
- C语言中引用其他模块定义的变量的方法
- poj1743:Musical Theme(后缀数组)
- c# 设置窗体初始化为居中显示
- AS导入ApiDemos
- [乐意黎原创] 2014年全国和云南省中级会计师成绩、分数段、过关率及年龄段统计分析
- 构建之法第八,九,十章阅读
- objetive-C中 self 与super 精解
- Java Excel 导入导出
- SpringMVC之入门基础注解和参数传递
- 第12周-程序阅读-多态性与抽象类-虚析构函数
- poj3321_Apple Tree(树状数组)
- js中eval详解
- Ubuntu15.04+Wine+QQ6.8成功安装运行
- UITouch和TableView如何响应点击事件
- SQL编程
- Journal entry of the eighth chapter to chapter ten
- const变量详解及与define宏定义的区别
- ssh 登陆与配置ssh无密码登陆别的机器与scp命令
- NYOJ 655 光棍的yy(大数斐波那契数列)
- 使用Unicorn将Sinatra应用部署到Nginx