Makefile variable assignment

Makefile variable assignment

What is the difference between :

VARIABLE = value

VARIABLE ?= value

VARIABLE := value

VARIABLE += value

1>VARIABLE = value

Normal setting of a variable - values within it are recursively expanded when the variable is used, not when it's declared

2> VARIABLE := value

Setting of a variable with simple expansion of the values inside - values within it are expanded at declaration time.

3> VARIABLE ?= value

Setting of a variable only if it doesn't have a value

3> VARIABLE += value

Appending the supplied value to the existing value

你可能感兴趣的:(操作系统,makefile,网络技术)