Module Name: src
Committed By: rillig
Date: Tue Nov 3 17:38:45 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: error.exp error.mk escape.mk
Log Message:
make(1): clean up tests error.mk and escape.mk
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/error.exp \
src/usr.bin/make/unit-tests/error.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/escape.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/error.exp
diff -u src/usr.bin/make/unit-tests/error.exp:1.2 src/usr.bin/make/unit-tests/error.exp:1.3
--- src/usr.bin/make/unit-tests/error.exp:1.2 Mon Sep 28 01:24:34 2020
+++ src/usr.bin/make/unit-tests/error.exp Tue Nov 3 17:38:45 2020
@@ -1,6 +1,6 @@
-make: "error.mk" line 3: just FYI
-make: "error.mk" line 4: warning: this could be serious
-make: "error.mk" line 5: this is fatal
+make: "error.mk" line 6: just FYI
+make: "error.mk" line 7: warning: this could be serious
+make: "error.mk" line 8: this is fatal
make: stopped in unit-tests
exit status 1
Index: src/usr.bin/make/unit-tests/error.mk
diff -u src/usr.bin/make/unit-tests/error.mk:1.2 src/usr.bin/make/unit-tests/error.mk:1.3
--- src/usr.bin/make/unit-tests/error.mk:1.2 Sat Oct 24 08:34:59 2020
+++ src/usr.bin/make/unit-tests/error.mk Tue Nov 3 17:38:45 2020
@@ -1,10 +1,12 @@
-# $NetBSD: error.mk,v 1.2 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: error.mk,v 1.3 2020/11/03 17:38:45 rillig Exp $
+#
+# Demonstrate that the .error directive exits immediately, without
+# continuing parsing until the end of the file.
.info just FYI
.warning this could be serious
.error this is fatal
+.info this is not reached because of the .error above
all:
-
-.info.html:
- @echo this should be ignored
+ : this is not reached because of the .error
Index: src/usr.bin/make/unit-tests/escape.mk
diff -u src/usr.bin/make/unit-tests/escape.mk:1.13 src/usr.bin/make/unit-tests/escape.mk:1.14
--- src/usr.bin/make/unit-tests/escape.mk:1.13 Sat Oct 24 08:50:17 2020
+++ src/usr.bin/make/unit-tests/escape.mk Tue Nov 3 17:38:45 2020
@@ -1,4 +1,4 @@
-# $NetBSD: escape.mk,v 1.13 2020/10/24 08:50:17 rillig Exp $
+# $NetBSD: escape.mk,v 1.14 2020/11/03 17:38:45 rillig Exp $
#
# Test backslash escaping.
@@ -187,7 +187,7 @@ var-1bsnl-space: .PHONY __printvars \
# Backslash-newline in a command is retained.
#
# The "#" in "# second line without space" makes it a comment instead
-# of a syntax error if the preceding line is parsed incorretly.
+# of a syntax error if the preceding line is parsed incorrectly.
# The ":" in "third line':" makes it look like the start of a
# target instead of a syntax error if the first line is parsed incorrectly.
#
@@ -220,7 +220,7 @@ cmd-1bsnl-eof:
# XXX: This may differ from POSIX, but matches gmake.
#
# When make passes two backslashes to the shell, the shell will pass one
-# backslash to the echo commant.
+# backslash to the echo command.
#
all: cmd-2bsnl
cmd-2bsnl: .PHONY