2 $description = "Test the if function.\n";
4 $details = "Try various uses of if and ensure they all give the correct
7 open(MAKEFILE, "> $makefile");
9 print MAKEFILE <<EOMAKE;
10 NEQ = \$(subst \$1,,\$2)
13 \t\@echo \$(if ,true,false)
14 \t\@echo \$(if ,true,)
16 \t\@echo \$(if z,true,false)
17 \t\@echo \$(if z,true,\$(shell echo hi))
18 \t\@echo \$(if ,\$(shell echo hi),false)
19 \t\@echo \$(if \$(call NEQ,a,b),true,false)
20 \t\@echo \$(if \$(call NEQ,a,a),true,false)
21 \t\@echo \$(if z,true,fal,se) hi
22 \t\@echo \$(if ,true,fal,se)there
27 &run_make_with_options($makefile, "", &get_logfile);
28 $answer = "false\n\n\ntrue\ntrue\nfalse\ntrue\nfalse\ntrue hi\nfal,sethere\n";
29 &compare_output($answer, &get_logfile(1));