Makefile::= 和 ::= 赋值运算符之间的区别
Makefile: difference between := and ::= assignment operators
Gnu Makefile 显示两个立即展开的符号,如下:
immediate := immediate
immediate ::= immediate
这两个有区别吗?
参考:gnu makefile 手册第 3.7 节
来自section 6.2:
Simply expanded variables are defined by lines using ‘:=’ or ‘::=’
(see Setting Variables). Both forms are equivalent in GNU make;
however only the ‘::=’ form is described by the POSIX standard
(support for ‘::=’ was added to the POSIX standard in 2012, so older
versions of make won’t accept this form either).
Gnu Makefile 显示两个立即展开的符号,如下:
immediate := immediate
immediate ::= immediate
这两个有区别吗?
参考:gnu makefile 手册第 3.7 节
来自section 6.2:
Simply expanded variables are defined by lines using ‘:=’ or ‘::=’ (see Setting Variables). Both forms are equivalent in GNU make; however only the ‘::=’ form is described by the POSIX standard (support for ‘::=’ was added to the POSIX standard in 2012, so older versions of make won’t accept this form either).