bryner%uiuc.edu 9b12bf288a GNU Make 3.79.1, hacked to use shmsdos. This is necessary because the old
version, based off of 3.74, seems to have problems with NSPR autoconf.

r=cls.


git-svn-id: svn://10.0.0.236/trunk@85225 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-21 08:07:01 +00:00

32 lines
844 B
Perl

# -*-perl-*-
$description = "Test the if function.\n";
$details = "Try various uses of if and ensure they all give the correct
results.\n";
open(MAKEFILE, "> $makefile");
print MAKEFILE <<EOMAKE;
NEQ = \$(subst \$1,,\$2)
all:
\t\@echo \$(if ,true,false)
\t\@echo \$(if ,true,)
\t\@echo \$(if ,true)
\t\@echo \$(if z,true,false)
\t\@echo \$(if z,true,\$(shell echo hi))
\t\@echo \$(if ,\$(shell echo hi),false)
\t\@echo \$(if \$(call NEQ,a,b),true,false)
\t\@echo \$(if \$(call NEQ,a,a),true,false)
\t\@echo \$(if z,true,fal,se) hi
\t\@echo \$(if ,true,fal,se)there
EOMAKE
close(MAKEFILE);
&run_make_with_options($makefile, "", &get_logfile);
$answer = "false\n\n\ntrue\ntrue\nfalse\ntrue\nfalse\ntrue hi\nfal,sethere\n";
&compare_output($answer, &get_logfile(1));
1;