makefile - := vs = in make macros

标签 makefile gnu-make colon-equals

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/

相关文章:

r - 使用 := multiple times in data. 表

syntax - ":="在伪代码中是什么意思?

r - 我什么时候应该使用 := operator in data. 表?

emacs 自定义 C++ 编译支持

makefile - 如何让 GNU 明确测试失败?

perl - WWW::Mechanize::Firefox - OpenSuse-Linux 版本 12.1 上的安装问题

linux - 在目标内部设置 make 变量

ruby - 在 OS X Snow Leopard 上使用 RVM 安装 Ruby 2.0 时出错

c++ - 如何为 C++ 设置跨平台编译(win7 中的 NetBeans 和 linux 中的 make)

java - jpcap 编译/安装在 Gumstix 上失败