assignment operators in makeppfile( = ;= += &= :=)

1. defered evaluation(=)

A = 1​
B = $(A)​
A = 2
$(info A=$(A), B=$(B))

output:

A=2,b=1

 

2. immediate evaluaion(:=)

C := 1​
D := $(C)​
C := 2​
$(info C=$(C), D=$(D))

output:

C=2,D=1

 

3. evaluated only at the time of the first use and then remembered​(;=)

E ;= $(perl sleep 5; return 3)​

 

4.append(+=)

F := 1​
F += 2​
$(info F=$(F))

output:

F=1 2

5.prepend(+=)

G := 1​
G &= 100​
$(info G=$(G))

output:

G=100 1

 Reference:

https://metacpan.org/dist/makepp/view/pod/makepp_variables.pod

 

posted on 2022-11-28 18:34  guolongnv  阅读(25)  评论(0)    收藏  举报