blob: bb97dbf388aff38ea75180ac1d9519f6959b86c3 [file] [log] [blame]
# -*-Perl-*-
$description = "\
The following test creates a makefile to test the error function.";
$details = "";
# Test #1
run_make_test(q!err = $(error Error found)
ifdef ERROR1
$(error error is $(ERROR1))
endif
ifdef ERROR2
$(error error is $(ERROR2))
endif
ifdef ERROR3
all: some; @echo $(error error is $(ERROR3))
endif
ifdef ERROR4
all: some; @echo error is $(ERROR4)
#TAB#@echo $(error error is $(ERROR4))
endif
some: ; @echo Some stuff
testvar: ; @: $(err)
!,
"ERROR1=yes", "#MAKEFILE#:4: *** error is yes. Stop.\n", 512);
# Test #2
run_make_test(undef, "ERROR2=no", "#MAKEFILE#:8: *** error is no. Stop.\n", 512);
# Test #3
run_make_test(undef, "ERROR3=maybe",
"Some stuff\n#MAKEFILE#:12: *** error is maybe. Stop.\n", 512);
# Test #4
run_make_test(undef, "ERROR4=definitely",
"Some stuff\n#MAKEFILE#:17: *** error is definitely. Stop.\n", 512);
# Test #5
run_make_test(undef, "testvar",
"#MAKEFILE#:22: *** Error found. Stop.\n", 512);
# This tells the test driver that the perl test script executed properly.
1;