From c637af71d9398a269c467a132109e0ef853806d4 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 27 Mar 2000 06:54:37 +0000 Subject: * A large number of fixes/enhancements. See the ChangeLog. * Added a new version of the German translation file. --- tests/scripts/options/dash-k | 107 +++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 40 deletions(-) (limited to 'tests/scripts/options/dash-k') diff --git a/tests/scripts/options/dash-k b/tests/scripts/options/dash-k index a5baaf7..fe5689e 100644 --- a/tests/scripts/options/dash-k +++ b/tests/scripts/options/dash-k @@ -1,36 +1,37 @@ -$description = "The following test creates a makefile to test the -k option.\n" - ."Normally, make gives up immediately if an error happens \n" - ."that make has not been told to ignore. However, if the -k\n" - ."option is specified, make continues to consider the other\n" - ."dependencies of the pending targets."; - -$details = "The makefile created in this test is a simulation of building \n" - ."a small product. However, the trick to this one is that one \n" - ."of the dependencies of the main target does not exist. \n" - ."Without the -k option, make would fail immediately and not \n" - ."build any part of the target. What we are looking for here, \n" - ."is that make builds the rest of the dependencies even though \n" - ."it knows that at the end it will fail to rebuild the main target."; +# -*-perl-*- + +$description = "Test the make -k (don't stop on error) option.\n"; + +$details = "\ +The makefile created in this test is a simulation of building +a small product. However, the trick to this one is that one +of the dependencies of the main target does not exist. +Without the -k option, make would fail immediately and not +build any part of the target. What we are looking for here, +is that make builds the rest of the dependencies even though +it knows that at the end it will fail to rebuild the main target."; open(MAKEFILE,"> $makefile"); # The Contents of the MAKEFILE ... -print MAKEFILE "VPATH = $workdir\n"; -print MAKEFILE "edit: main.o kbd.o commands.o display.o \n"; -print MAKEFILE "\t\@echo cc -o edit main.o kbd.o commands.o display.o \n"; +print MAKEFILE < $makefile2"); +print MAKEFILE <<'EOF'; +.SUFFIXES: + +all: exe1 exe2; @echo making $@ + +exe1 exe2: lib; @echo cp $^ $@ + +lib: foo.o; @echo cp $^ $@ + +foo.o: ; exit 1 +EOF + +close(MAKEFILE); + +&run_make_with_options($makefile2, "-k", &get_logfile, $error_code); + +$answer = "exit 1 +$make_name: *** [foo.o] Error 1 +$make_name: Target `all' not remade because of errors.\n"; + +&compare_output($answer, &get_logfile(1)); 1; -- cgit v1.2.3