1 bar := FAIL 2 pf := prog: baz 3 $(pf) := PASS 4 5 moge := PASS 6 hoge := $$(moge) 7 8 a := FAIL 9 b := c 10 c := PASS 11 12 d := FAIL 13 e := $$f 14 f := PASS 15 16 empty:=# 17 g := FAIL 18 h := $(empty) PASS 19 20 define evaltest 21 $(eval foo := PASS) 22 $(eval bar := $$(foo)) 23 echo $(bar) 24 $(eval prog: baz := FAIL) 25 echo $($(pf)) 26 $(eval fuga := $(hoge)) 27 echo $(fuga) 28 $(eval a := $($(b))) 29 echo $(a) 30 $(eval d := $(e)) 31 echo $(d) 32 $(eval g := $(h)) 33 echo _$(g)_ 34 endef 35 36 a.x=X 37 y:=Y 38 $(foreach tag,x,$(eval a.$(tag)+=$(y))) 39 y:=Z 40 $(foreach tag,x,$(eval a.$(tag)+=$(y))) 41 $(info $(a.x)) 42 43 test: 44 $(call evaltest) 45