:= vs = in make macros
MakefileGnu MakeColon EqualsMakefile Problem Overview
> Possible Duplicate:
> https://stackoverflow.com/questions/448910/makefile-variable-assignment
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
?
Makefile Solutions
Solution 1 - Makefile
Variables defined with :=
in GNU make are expanded when they are defined rather than when they are used.