Possible Duplicate:
What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?
我只知道很基本的makefile
语法,并正在阅读另一个项目的 makefile
并遇到了:=
用于宏声明。他们为什么要使用它?
换句话说,两者之间有什么区别吗
MYMACRO = hi i'm a macro
和
MYMACRO := hi i'm a macro
?
最佳答案
GNU make 中使用 :=
定义的变量在定义它们时而不是在使用它们时进行扩展。
关于makefile - := vs = in make macros,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6283320/