=作用
最基本的赋值。例子:
VRE = "Hello World!"
all:
@echo $(VRE)
执行make,输出:Hello World!
:=作用
覆盖之前的值。例子:
VRE = "Hello World!"
VRE := "Hello World!Again!"
all:
@echo $(VRE)
执行make,输出:Hello World!Again!
?=作用
如果没有被赋值过就赋予等号后面的值。例子:
VRE = "Hello World!"
VRE ?= "Hello World! First!"
all:
@echo $(VRE)
执行make,输出:Hello World!
+=作用
参考文献
[1] Makefile 中:= ?= += =的区别
https://www.cnblogs.com/wanqieddy/archive/2011/09/21/2184257.html
[2] makefile的展开过程陷阱
https://www.jianshu.com/p/59d000642b1c
[3] Makefile中的include命令详解
https://www.cnblogs.com/cuckoos/articles/5049984.html