]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* job.c (child_error): Combine file info with error message.
authorPaul Smith <psmith@gnu.org>
Sat, 19 Mar 2016 21:24:00 +0000 (17:24 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 20 Mar 2016 18:23:22 +0000 (14:23 -0400)
* tests/scripts/...: Update error message matches.

12 files changed:
job.c
tests/scripts/features/errors
tests/scripts/features/output-sync
tests/scripts/features/parallelism
tests/scripts/features/patternrules
tests/scripts/features/vpathplus
tests/scripts/misc/general3
tests/scripts/options/dash-k
tests/scripts/targets/DELETE_ON_ERROR
tests/scripts/targets/POSIX
tests/scripts/variables/SHELL
tests/scripts/variables/special

diff --git a/job.c b/job.c
index e6a71c0c222d1f83ec1d9fb3f6f7a01469baf9ac..6fa9e8a839a5b0b4aad66b9e979c9d414cadb85e 100644 (file)
--- a/job.c
+++ b/job.c
@@ -506,19 +506,16 @@ child_error (struct child *child,
 
   OUTPUT_SET (&child->output);
 
-  message (0, l + strlen (nm),
-           _("%s: recipe for target '%s' failed"), nm, f->name);
-
   l += strlen (pre) + strlen (post);
 
   if (exit_sig == 0)
     error (NILF, l + INTSTR_LENGTH,
-           _("%s[%s] Error %d%s"), pre, f->name, exit_code, post);
+           _("%s[%s: %s] Error %d%s"), pre, nm, f->name, exit_code, post);
   else
     {
       const char *s = strsignal (exit_sig);
       error (NILF, l + strlen (s) + strlen (dump),
-             _("%s[%s] %s%s%s"), pre, f->name, s, dump, post);
+             "%s[%s: %s] %s%s%s", pre, nm, f->name, s, dump, post);
     }
 
   OUTPUT_UNSET ();
index c0339cb60ef4e69b25445c581a6cc73b0c2a6b0f..43b81d4dabad6be65819d9aa3746da559a852585 100644 (file)
@@ -30,7 +30,7 @@ open(MAKEFILE,"> $makefile");
 print MAKEFILE "clean:\n"
               ."\t-$rm_command cleanit\n"
               ."\t$rm_command foo\n"
-             ."clean2: \n"
+              ."clean2: \n"
               ."\t$rm_command cleanit\n"
               ."\t$rm_command foo\n";
 
@@ -50,8 +50,7 @@ $delete_error_code = $? >> 8;
 
 $answer = "$rm_command cleanit
 $cleanit_error
-$makefile:2: recipe for target 'clean' failed
-$make_name: [clean] Error $delete_error_code (ignored)
+$make_name: [$makefile:2: clean] Error $delete_error_code (ignored)
 $rm_command foo\n";
 
 &run_make_with_options($makefile,"",&get_logfile);
@@ -78,8 +77,7 @@ if (!$vos)
 
 $answer = "$rm_command cleanit
 $cleanit_error
-$makefile:5: recipe for target 'clean2' failed
-$make_name: [clean2] Error $delete_error_code (ignored)
+$make_name: [$makefile:5: clean2] Error $delete_error_code (ignored)
 $rm_command foo\n";
 
 &run_make_with_options($makefile,"clean2 -i",&get_logfile);
index ff3aff1d8eacaf51a276e306b419654f14e75383..ee3e5ad8a1501f0a670a499c8836f813a17a79ed 100644 (file)
@@ -204,11 +204,9 @@ bar: end
 #MAKE#[1]: Entering directory '#PWD#/foo'
 foo-fail: start
 foo-fail: end
-Makefile:20: recipe for target 'foo-fail' failed
-#MAKE#[1]: *** [foo-fail] Error 1
+#MAKE#[1]: *** [Makefile:20: foo-fail] Error 1
 #MAKE#[1]: Leaving directory '#PWD#/foo'
-#MAKEFILE#:4: recipe for target 'make-foo-fail' failed
-#MAKE#: *** [make-foo-fail] Error 2\n",
+#MAKE#: *** [#MAKEFILE#:4: make-foo-fail] Error 2\n",
 512);
 
 # Test the per-job synchronization.
@@ -326,7 +324,7 @@ run_make_test(qq!
 all: t1
 t1: ; -\@\$(MAKE) -f $m1
 !,
-              "-j -Oline", "#MAKE#[1]: Entering directory '#PWD#'\nd1 stderr\nd1 stdout\n$m1:3: *** d1 failed.  Stop.\n#MAKE#[1]: Leaving directory '#PWD#'\n#MAKEFILE#:3: recipe for target 't1' failed\n#MAKE#: [t1] Error 2 (ignored)\n");
+              "-j -Oline", "#MAKE#[1]: Entering directory '#PWD#'\nd1 stderr\nd1 stdout\n$m1:3: *** d1 failed.  Stop.\n#MAKE#[1]: Leaving directory '#PWD#'\n#MAKE#: [#MAKEFILE#:3: t1] Error 2 (ignored)\n");
 
 rmfiles($m1);
 
@@ -343,7 +341,7 @@ foo: $(OBJS) ; echo $(or $(filter %.o,$^),$(error fail))
 run_make_test(q!
 all:: ; @./foo bar baz
 !,
-              '-O', "#MAKE#: ./foo: Command not found\n#MAKEFILE#:2: recipe for target 'all' failed\n#MAKE#: *** [all] Error 127\n", 512);
+              '-O', "#MAKE#: ./foo: Command not found\n#MAKE#: *** [#MAKEFILE#:2: all] Error 127\n", 512);
 
 # This tells the test driver that the perl test script executed properly.
 1;
index c702c2687bb0ee77fb140cb923699865a225f0f1..6b9efe1bd40b185ed71a6c781b43ef72c9c4957e 100644 (file)
@@ -99,15 +99,12 @@ ok:
        \@$sleep_command 4
        \@echo Ok done",
               '-rR -j5', "Fail
-#MAKEFILE#:6: recipe for target 'fail.1' failed
-#MAKE#: *** [fail.1] Error 1
+#MAKE#: *** [#MAKEFILE#:6: fail.1] Error 1
 #MAKE#: *** Waiting for unfinished jobs....
 Fail
-#MAKEFILE#:6: recipe for target 'fail.2' failed
-#MAKE#: *** [fail.2] Error 1
+#MAKE#: *** [#MAKEFILE#:6: fail.2] Error 1
 Fail
-#MAKEFILE#:6: recipe for target 'fail.3' failed
-#MAKE#: *** [fail.3] Error 1
+#MAKE#: *** [#MAKEFILE#:6: fail.3] Error 1
 Ok done",
              512);
 
@@ -214,3 +211,7 @@ rmfiles('file1', 'file2', 'file3', 'file4');
 # rmfiles(qw(dependfile output));
 
 1;
+
+### Local Variables:
+### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
+### End:
index 0ff49a75ede1dabb9a35049d022cb856156d9ea0..c7ae7cffc474e4a1991d8c7b9ec8390eecdb2e4a 100644 (file)
@@ -110,8 +110,7 @@ $(dir)/foo.bar:
 
 ',
 "dir=$dir",
-"#MAKEFILE#:6: recipe for target '$dir/foo.bar' failed
-#MAKE#: *** [$dir/foo.bar] Error 1",
+"#MAKE#: *** [#MAKEFILE#:6: $dir/foo.bar] Error 1",
 512);
 
 unlink("$dir/foo.bar");
@@ -223,3 +222,7 @@ all: foo.x foo-mt.x
 
 # This tells the test driver that the perl test script executed properly.
 1;
+
+### Local Variables:
+### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
+### End:
index 361788c784d845f8d4976dbf2c75b64f6cd782fa..9ade3f0c3d7de68cf18e2acc1a6c10d5ee1dbf2e 100644 (file)
@@ -86,8 +86,7 @@ cat ${VP}foo.c bar.c > foo.b 2>/dev/null || exit 1
 
 $answer = "not creating notarget.c from notarget.d
 cat notarget.c > notarget.b 2>/dev/null || exit 1
-$makefile:16: recipe for target 'notarget.b' failed
-$make_name: *** [notarget.b] Error 1
+$make_name: *** [$makefile:16: notarget.b] Error 1
 ";
 
 &compare_output($answer,&get_logfile(1));
@@ -127,3 +126,7 @@ rm inter.c
 unlink @touchedfiles unless $keep;
 
 1;
+
+### Local Variables:
+### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
+### End:
index 8ad0f8e22bf083ea9f8f17107ceb23de47c86bca..7bbff1c2c7b08403fcc917222d084730602043fb 100644 (file)
@@ -310,4 +310,6 @@ foo     bar
 hi
 foo     bar');
 
+run_make_test('x:;@-exit 1', '', "#MAKE#: [#MAKEFILE#:1: x] Error 1 (ignored)\n");
+
 1;
index e784e0db43ad579c9444e3f0b4c09bc79f40693e..85dd0b0a3b6fe94c45acae28b1b4b4f873efc68d 100644 (file)
@@ -42,7 +42,7 @@ close(MAKEFILE);
                "$workdir${pathsep}command.h",
                "$workdir${pathsep}commands.c","$workdir${pathsep}display.c",
                "$workdir${pathsep}buffer.h",
-              "$workdir${pathsep}command.c");
+               "$workdir${pathsep}command.c");
 
 &touch(@files_to_touch);
 
@@ -92,8 +92,7 @@ close(MAKEFILE);
 &run_make_with_options($makefile2, "-k", &get_logfile, $error_code);
 
 $answer = "exit 1
-$makefile2:9: recipe for target 'foo.o' failed
-$make_name: *** [foo.o] Error 1
+$make_name: *** [$makefile2:9: foo.o] Error 1
 $make_name: Target 'all' not remade because of errors.\n";
 
 &compare_output($answer, &get_logfile(1));
index 08f009faeb125c8b0a8fd9c74981e3a318e64d8d..db9709325ce788b13fdf63aae4a14069a5a1335b 100644 (file)
@@ -8,7 +8,7 @@ run_make_test('
 .DELETE_ON_ERROR:
 all: ; false > $@
 ',
-              '', "false > all\n#MAKEFILE#:3: recipe for target 'all' failed\n#MAKE#: *** [all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
+              '', "false > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
 
 run_make_test('
 .DELETE_ON_ERROR:
@@ -16,7 +16,7 @@ all: foo.x ;
 %.x : %.q ; echo > $@
 %.q : ; false > $@
 ',
-              '', "false > foo.q\n#MAKEFILE#:5: recipe for target 'foo.q' failed\n#MAKE#: *** [foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
+              '', "false > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
 
 # This tells the test driver that the perl test script executed properly.
 1;
index a24e3bcf6d558f66c55a2218d3c9d0daca74030f..5c3c7f89a61d01624c5ff2af390da4826a984f46 100644 (file)
@@ -17,8 +17,7 @@ run_make_test(qq!
 .POSIX:
 all: ; \@$script
 !,
-              '', "#MAKEFILE#:3: recipe for target 'all' failed
-#MAKE#: *** [all] Error $err\n", 512);
+              '', "#MAKE#: *** [#MAKEFILE#:3: all] Error $err\n", 512);
 
 # User settings must override .POSIX
 $flags = '-xc';
index 1d01ba3f264e1de68e871bcbd97d842595b95b99..edba7b67e84e695c492c2c63886afc5df961abbd 100644 (file)
@@ -97,7 +97,6 @@ run_make_test(qq!
 .SHELLFLAGS = $flags
 all: ; \@$script
 !,
-              '', "$out#MAKEFILE#:3: recipe for target 'all' failed
-#MAKE#: *** [all] Error $err\n", 512);
+              '', "$out#MAKE#: *** [#MAKEFILE#:3: all] Error $err\n", 512);
 
 1;
index 2c0b42cac367b185b35c1180dfba5625593f37e2..68f3128cf7b9722bbc1d37c37edc51c5ba850b19 100644 (file)
@@ -39,9 +39,9 @@ all:;@:
 # X1 := $(sort $(.TARGETS))
 
 # all: foo
-#       @echo X1 = $(X1)
-#       @echo X2 = $(X2)
-#       @echo LAST = $(sort $(.TARGETS))
+#      @echo X1 = $(X1)
+#      @echo X2 = $(X2)
+#      @echo LAST = $(sort $(.TARGETS))
 
 # X2 := $(sort $(.TARGETS))
 
@@ -64,16 +64,16 @@ define foo
 : foo-one\
 foo-two
 : foo-three
-        : foo-four
+       : foo-four
 endef
 
 orig: ; : orig-one
-        : orig-two \
+       : orig-two \
 orig-three \
-        orig-four \
-                orig-five \\\\
-        : orig-six
-        $(foo)
+       orig-four \
+               orig-five \\\\
+       : orig-six
+       $(foo)
 
 .RECIPEPREFIX = >
 test: ; : test-one
@@ -86,19 +86,19 @@ test-three \
 
 .RECIPEPREFIX =
 reset: ; : reset-one
-        : reset-two \
+       : reset-two \
 reset-three \
-        reset-four \
-                reset-five \\\\
-        : reset-six
-        $(foo)
+       reset-four \
+               reset-five \\\\
+       : reset-six
+       $(foo)
 ',
                'orig test reset',
                ': orig-one
 : orig-two \
 orig-three \
 orig-four \
-        orig-five \\\\
+       orig-five \\\\
 : orig-six
 : foo-one foo-two
 : foo-three
@@ -107,7 +107,7 @@ orig-four \
 : test-two \
 test-three \
 test-four \
-        test-five \\\\
+       test-five \\\\
 : test-six
 : foo-one foo-two
 : foo-three
@@ -116,7 +116,7 @@ test-four \
 : reset-two \
 reset-three \
 reset-four \
-        reset-five \\\\
+       reset-five \\\\
 : reset-six
 : foo-one foo-two
 : foo-three