Adjust output strings to be aligned

Change error and fatal messages to start with lowercase and not
end with a period.  Note a few very common messages were left
as-is, just in case some other tools parse them.

Also modify the test known-good-output to satisfy the messages.
This commit is contained in:
Paul Smith
2023-04-01 15:57:04 -04:00
parent a0d1e76d60
commit c2792d6129
27 changed files with 105 additions and 100 deletions

View File

@@ -83,7 +83,7 @@ if ($parallel_jobs) {
# TEST 8: Test circular dependency check; PR/1671
run_make_test(undef, "d", "ok\n$make_name: Circular d <- d dependency dropped.\noops\n");
run_make_test(undef, "d", "ok\n$make_name: circular d <- d dependency dropped\noops\n");
# TEST 8: I don't grok why this is different than the above, but it is...
#

View File

@@ -177,7 +177,7 @@ all: hello.tsk
%.o:$r %.c; \$(info hello.c)
%.o:$r %.f %.tsk; \$(info hello.f)
", '-r',
"#MAKE#: Circular hello.o <- hello.tsk dependency dropped.\nhello.f\nhello.tsk\n#MAKE#: Nothing to be done for 'all'.");
"#MAKE#: circular hello.o <- hello.tsk dependency dropped\nhello.f\nhello.tsk\n#MAKE#: Nothing to be done for 'all'.");
}

View File

@@ -432,9 +432,9 @@ all:; @echo hello
include inc_b.mk
%_a.mk %_b.mk:; exit 1
!,
'', "exit 1\n#MAKEFILE#:4: Failed to remake makefile 'inc_b.mk'.\n", 512);
'', "exit 1\n#MAKEFILE#:4: failed to remake makefile 'inc_b.mk'", 512);
run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:4: Failed to remake makefile 'inc_b.mk'.\n", 512);
run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:4: failed to remake makefile 'inc_b.mk'", 512);
# It seems wrong to me that this gives a different error message, but at
# least it doesn't keep going.
@@ -446,7 +446,7 @@ include inc_a.mk
!,
'', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n", 512);
run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n#MAKEFILE#:3: Failed to remake makefile 'inc_a.mk'.\n", 512);
run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n#MAKEFILE#:3: failed to remake makefile 'inc_a.mk'", 512);
# Check the default makefiles... this requires us to invoke make with no
# arguments. Also check MAKEFILES

View File

@@ -14,7 +14,7 @@ if (!$parallel_jobs) {
# Shorthand
my $np = '--no-print-directory';
my $j1err = "warning: jobserver unavailable: using -j1. Add '+' to parent make rule.";
my $j1err = "warning: jobserver unavailable: using -j1 (add '+' to parent make rule)";
# Simple test of MAKEFLAGS settings
run_make_test(q!
@@ -42,7 +42,7 @@ recurse: ; @echo $@: "/$(SHOW)/"; $(MAKE) -j3 -f #MAKEFILE# recurse2
recurse2: ; @echo $@: "/$(SHOW)/"; $(MAKE) -f #MAKEFILE# all
all:;@echo $@: "/$(SHOW)/"
!,
"-j2 $np", "recurse: /-j2 --jobserver-auth=<auth> $np/\n#MAKE#[1]: warning: -j3 forced in submake: resetting jobserver mode.\nrecurse2: /-j3 --jobserver-auth=<auth> $np/\nall: /-j3 --jobserver-auth=<auth> $np/\n");
"-j2 $np", "recurse: /-j2 --jobserver-auth=<auth> $np/\n#MAKE#[1]: warning: -j3 forced in submake: resetting jobserver mode\nrecurse2: /-j3 --jobserver-auth=<auth> $np/\nall: /-j3 --jobserver-auth=<auth> $np/\n");
# Test override of -jN with -j
run_make_test(q!
@@ -51,7 +51,7 @@ recurse: ; @echo $@: "/$(SHOW)/"; $(MAKE) -j -f #MAKEFILE# recurse2
recurse2: ; @echo $@: "/$(SHOW)/"; $(MAKE) -f #MAKEFILE# all
all:;@echo $@: "/$(SHOW)/"
!,
"-j2 $np", "recurse: /-j2 --jobserver-auth=<auth> $np/\n#MAKE#[1]: warning: -j0 forced in submake: resetting jobserver mode.\nrecurse2: /-j $np/\nall: /-j $np/\n");
"-j2 $np", "recurse: /-j2 --jobserver-auth=<auth> $np/\n#MAKE#[1]: warning: -j0 forced in submake: resetting jobserver mode\nrecurse2: /-j $np/\nall: /-j $np/\n");
# Don't put --jobserver-auth into a re-exec'd MAKEFLAGS.
# We can't test this directly because there's no way a makefile can
@@ -76,7 +76,7 @@ inc.mk:
#> @echo 'MAKEFLAGS = $(MAKEFLAGS)'
> @echo 'FOO = bar' > $@
!,
"$np -j2", "#MAKE#[1]: warning: -j2 forced in submake: resetting jobserver mode.\nall\n");
"$np -j2", "#MAKE#[1]: warning: -j2 forced in submake: resetting jobserver mode\nall\n");
unlink('inc.mk');
@@ -118,7 +118,7 @@ recurse: ; @echo hi
!,
'-w -j2', "#MAKE#: Entering directory '#PWD#'
#MAKE#[1]: Entering directory '#PWD#'
#MAKE#[1]: warning: -j1 forced in submake: resetting jobserver mode.
#MAKE#[1]: warning: -j1 forced in submake: resetting jobserver mode
hi
#MAKE#[1]: Leaving directory '#PWD#'
#MAKE#: Leaving directory '#PWD#'\n");

View File

@@ -1,3 +1,5 @@
# -*-perl-*-
$description = "\
The following test creates a makefile to test the presence
of multiple rules for one target. One file can be the
@@ -21,8 +23,8 @@ print MAKEFILE <<EOF;
objects = foo.o bar.o
foo.o : defs.h
bar.o : defs.h test.h
extradeps =
\$(objects) : config.h \$(extradeps)
extradeps =
\$(objects) : config.h \$(extradeps)
\t\@echo EXTRA EXTRA
EOF
@@ -36,7 +38,7 @@ if ($vos)
{
$error_code = 3307;
}
else
else
{
$error_code = 512;
}
@@ -78,9 +80,9 @@ all: hello.c; $(info $@ from $^)
hello.c: ; $(info 1 $@)
src/hello.c: ; $(info 2 $@)
!, '',
"#MAKEFILE#:4: Recipe was specified for file 'hello.c' at #MAKEFILE#:4,
#MAKEFILE#:4: but 'hello.c' is now considered the same file as 'src/hello.c'.
#MAKEFILE#:4: Recipe for 'hello.c' will be ignored in favor of the one for 'src/hello.c'.
"#MAKEFILE#:4: recipe was specified for file 'hello.c' at #MAKEFILE#:4,
#MAKEFILE#:4: but 'hello.c' is now considered the same file as 'src/hello.c'
#MAKEFILE#:4: recipe for 'hello.c' will be ignored in favor of the one for 'src/hello.c'
2 src/hello.c
all from src/hello.c
#MAKE#: 'all' is up to date.\n");

View File

@@ -475,7 +475,7 @@ unlink('1.all', '1.q', '1.r');
run_make_test(q!
%a %b : ; touch $*a
!,
'gta', "touch gta\n#MAKEFILE#:2: warning: pattern recipe did not update peer target 'gtb'.\n");
'gta', "touch gta\n#MAKEFILE#:2: warning: pattern recipe did not update peer target 'gtb'\n");
unlink(qw(gta));
# We don't warn if we didn't update the file
@@ -497,7 +497,7 @@ all:;
include gta
%a %b : ; touch $*a
!,
'', "touch gta\n#MAKEFILE#:4: warning: pattern recipe did not update peer target 'gtb'.\n#MAKE#: 'all' is up to date.");
'', "touch gta\n#MAKEFILE#:4: warning: pattern recipe did not update peer target 'gtb'\n#MAKE#: 'all' is up to date.");
unlink(qw(gta));
run_make_test(q!
@@ -505,7 +505,7 @@ run_make_test(q!
%.o: %.c; touch $@
foo.y: ; touch $@
!,
'foo.o', "touch foo.y\ntouch foo.c\n#MAKEFILE#:2: warning: pattern recipe did not update peer target 'foo.h'.\ntouch foo.o\nrm foo.c");
'foo.o', "touch foo.y\ntouch foo.c\n#MAKEFILE#:2: warning: pattern recipe did not update peer target 'foo.h'\ntouch foo.o\nrm foo.c");
unlink(qw(foo.y foo.c foo.o));
if (0) {

View File

@@ -185,9 +185,9 @@ foo: $$@.o ;
# Not creating libcat.a here prevents segfault,
libcat.a: ; @touch $@
!,
'', q!#MAKEFILE#:16: Recipe was specified for file '-lcat' at #MAKEFILE#:16,
#MAKEFILE#:16: but '-lcat' is now considered the same file as 'libcat.a'.
#MAKEFILE#:16: Recipe for '-lcat' will be ignored in favor of the one for 'libcat.a'.!);
'', q!#MAKEFILE#:16: recipe was specified for file '-lcat' at #MAKEFILE#:16,
#MAKEFILE#:16: but '-lcat' is now considered the same file as 'libcat.a'
#MAKEFILE#:16: recipe for '-lcat' will be ignored in favor of the one for 'libcat.a'!);
unlink('libcat.a');
# SV 28456 : Don't reset $$< for default recipes
@@ -454,9 +454,9 @@ all: hello.c; $(info $@ from $^)
hello.c: $$(info second expansion of hello.c prereqs); $(info 1 $@)
src/hello.c: $$(info second expansion of src/hello.c prereqs); $(info 2 $@)
!, '',
"#MAKEFILE#:5: Recipe was specified for file 'hello.c' at #MAKEFILE#:5,
#MAKEFILE#:5: but 'hello.c' is now considered the same file as 'src/hello.c'.
#MAKEFILE#:5: Recipe for 'hello.c' will be ignored in favor of the one for 'src/hello.c'.
"#MAKEFILE#:5: recipe was specified for file 'hello.c' at #MAKEFILE#:5,
#MAKEFILE#:5: but 'hello.c' is now considered the same file as 'src/hello.c'
#MAKEFILE#:5: recipe for 'hello.c' will be ignored in favor of the one for 'src/hello.c'
second expansion of src/hello.c prereqs
second expansion of hello.c prereqs
2 src/hello.c

View File

@@ -183,7 +183,7 @@ else
default:;: $(ELT)
endif
!,
'--no-print-directory -j2 --jobserver-style=pipe', "#MAKE#[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.\n: 2\n: 1");
'--no-print-directory -j2 --jobserver-style=pipe', "#MAKE#[2]: warning: jobserver unavailable: using -j1 (add '+' to parent make rule)\n: 2\n: 1");
}
# This crashes if we use vfork and don't reset environ properly

View File

@@ -26,7 +26,8 @@ run_make_test(undef, '', "#MAKE#: Nothing to be done for 'all'.");
run_make_test(undef, '-B', 'cp bar.x foo');
# Put the timestamp for foo into the future; it should still be remade.
# There are clock skew errors printed here but they will be cleared by
# the comparison code.
utouch(1000, 'foo');
run_make_test(undef, '', "#MAKE#: Nothing to be done for 'all'.");
run_make_test(undef, '-B', 'cp bar.x foo');

View File

@@ -19,7 +19,8 @@ run_make_test(undef, '', "#MAKE#: 'a.x' is up to date.");
run_make_test(undef, '-W b.x', 'echo >> a.x');
# Put the timestamp for a.x into the future; it should still be remade.
# There are clock skew errors printed here but they will be cleared by
# the comparison code.
utouch(1000, 'a.x');
run_make_test(undef, '', "#MAKE#: 'a.x' is up to date.");
run_make_test(undef, '-W b.x', 'echo >> a.x');
@@ -50,6 +51,8 @@ touch baz.x');
# Now run with -W bar.x
# Tweak foo.x's timestamp so the update will change it.
# There are clock skew errors printed here but they will be cleared by
# the comparison code.
&utouch(1000, 'foo.x');
run_make_test(undef, '-W bar.x', "restarts=\ntouch foo.x\nrestarts=1\ntouch baz.x");

View File

@@ -108,7 +108,7 @@ ifile: no-such-file; exit 1
'-k',
"#MAKEFILE#:2: ifile: $ERR_no_such_file
#MAKE#: *** No rule to make target 'no-such-file', needed by 'ifile'.
#MAKEFILE#:2: Failed to remake makefile 'ifile'.\n",
#MAKEFILE#:2: failed to remake makefile 'ifile'",
512);
}

View File

@@ -92,7 +92,7 @@ all: a_ b_ ; @echo $@
a_: b_
b_: a_
',
'--shuffle=reverse', "#MAKE#: Circular a_ <- b_ dependency dropped.\na_\nb_\nall");
'--shuffle=reverse', "#MAKE#: circular a_ <- b_ dependency dropped\na_\nb_\nall");
# Check if order-only dependencies get reordered.
run_make_test('

View File

@@ -8,7 +8,7 @@ run_make_test('
.DELETE_ON_ERROR:
all: ; exit 1 > $@
',
'', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
'', "exit 1 > 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 : ; exit 1 > $@
',
'', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
'', "exit 1 > 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;