Makefile 中四种变量赋值方式的区别
2012-11-16 11:28
537 查看
From: http://my.oschina.net/zengsai/blog/9566
Ask:
What is the difference between :
I have read the section in GNU Make's manual, but it still doesn't make sense to me.
Explanation:
VARIABLE = value
Normal setting of a variable - values within it are recursively expanded when the variable is used, not when it's declared
VARIABLE := value
Setting of a variable with simple expansion of the values inside - values within it are expanded at declaration time.
VARIABLE ?= value
Setting of a variable only if it doesn't have a value
VARIABLE += value
Appending the supplied value to the existing value
Ask:
What is the difference between :
VARIABLE = value VARIABLE ?= value VARIABLE := value VARIABLE += value
I have read the section in GNU Make's manual, but it still doesn't make sense to me.
Explanation:
VARIABLE = value
Normal setting of a variable - values within it are recursively expanded when the variable is used, not when it's declared
VARIABLE := value
Setting of a variable with simple expansion of the values inside - values within it are expanded at declaration time.
VARIABLE ?= value
Setting of a variable only if it doesn't have a value
VARIABLE += value
Appending the supplied value to the existing value
相关文章推荐
- Makefile中四种变量赋值的区别
- 【java】给成员变量赋值的两种方式的区别 --setXxx()方法和构造方法
- makefile中的各种变量赋值方式
- makefile 变量的赋值方式
- 给成员变量赋值的两种方式的区别
- Makefile知识点-1-----变量赋值的方式
- Makefile中四种变量赋值
- 给成员变量赋值的两种方式的区别
- 【Makefile由浅入深完全学习记录4】变量和不同的赋值方式
- Makefile中变量赋值方法的区别
- 注意区分shell与Makefile中变量赋值的区别
- 在make中有四种方式对变量赋值:
- java整数变量的四种赋值方式
- Makefile 的几种赋值方式
- Makefile内置变量,递归式变量,直接展开式变量,条件赋值,追加赋值,Makefile中shell命令的执行
- 栈(stack)与堆(heap)区别以及Java的string变量赋值的内部工作机制(精典转载贴)
- SELECT 与 SET 对变量赋值的区别 存储过程 sql 2000(转载)
- set变量赋值=和:=的区别
- C程序中交换两个变量数值,不使用第三方变量(四种方式)
- 通过脚本的方式杀tomcat进程(shell脚本),shell中将一个文件的内容读出赋值给一个变量