Makefile中四种变量赋值的区别
2012-01-31 16:25
344 查看
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
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 中四种变量赋值方式的区别
- Makefile中四种变量赋值
- 注意区分shell与Makefile中变量赋值的区别
- Makefile中变量赋值方法的区别
- sqlplus中define定义的常量和variable定义的变量已经column给变量赋值的区别
- java整数变量的四种赋值方式
- Makefile 变量定义(*赋值)
- makefile 变量的赋值方式
- 变量的定义、声明、赋值和初始化的区别
- Makefile中变量$var与$$var的区别详谈
- makefile学习记录:空字符和""," "区别以及变量定义中多余的空格如何处理
- SELECT 与 SET 对变量赋值的区别
- Shell脚本中赋值变量时单引号‘和双引号“的区别
- C++构造函数对类成员变量初始化,使用初始化列表和构造函数内部直接赋值 的区别
- c++ 初始化列表与成员变量赋值的区别
- js中将函数名赋值给变量与将函数名加括号赋值给变量的区别
- Makefile中赋值符号=, :=, ?=, +=的区别
- makefile的四种赋值
- 在Makefile里如何对make命令行中的变量重新赋值
- Makefile中 变量赋值含义