开发者

:= vs = in make macros [duplicate]

开发者 https://www.devze.com 2023-03-11 18:40 出处:网络
This question already has an开发者_开发百科swers here: Closed 11 years ago. Possible Duplicate: What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?
This question already has an开发者_开发百科swers here: Closed 11 years ago.

Possible Duplicate:

What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?

I only know very basic makefile syntax, and was reading through another project's makefile and came across := for macro declaration. Why would they use that?

In other words, is there any difference between

MYMACRO = hi i'm a macro

and

MYMACRO := hi i'm a macro

?


Variables defined with := in GNU make are expanded when they are defined rather than when they are used.

0

精彩评论

暂无评论...
验证码 换一张
取 消