1VAR:=OK 2 3ifdef VAR 4PASS1:=PASS1 5endif # foo 6 7ifdef VAR # hoge 8PASS2:=PASS2 9endif # foo 10 11ifeq ($(VAR),OK) # hoge 12PASS3:=PASS3 13else # bar 14$(error fail) 15endif # foo 16 17ifeq ($(VAR),NOK) # hoge 18$(error fail) 19else # bar 20PASS4:=PASS4 21endif # foo 22 23ifeq ($(VAR),NOK)# hoge 24$(error fail) 25else# bar 26PASS5:=PASS5 27endif# foo 28 29test: 30 echo $(PASS1) 31 echo $(PASS2) 32 echo $(PASS3) 33 echo $(PASS4) 34 echo $(PASS5) 35