Sat Aug 29 17:34:21 2020 UTC ()
make(1): add tests for .SILENT, .BEGIN and .END


(rillig)
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-silent.exp
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-begin.exp
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-end.exp
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-silent.mk
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-begin.mk
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-end.mk

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-silent.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/depsrc-silent.exp 2020/08/16 12:07:51 1.1
+++ src/usr.bin/make/unit-tests/depsrc-silent.exp 2020/08/29 17:34:21 1.2

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-begin.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/deptgt-begin.exp 2020/08/16 12:07:51 1.1
+++ src/usr.bin/make/unit-tests/deptgt-begin.exp 2020/08/29 17:34:21 1.2

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-end.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/deptgt-end.exp 2020/08/16 12:07:51 1.1
+++ src/usr.bin/make/unit-tests/deptgt-end.exp 2020/08/29 17:34:21 1.2

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-silent.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/depsrc-silent.mk 2020/08/16 14:25:16 1.2
+++ src/usr.bin/make/unit-tests/depsrc-silent.mk 2020/08/29 17:34:21 1.3
@@ -1,8 +1,12 @@ @@ -1,8 +1,12 @@
1# $NetBSD: depsrc-silent.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ 1# $NetBSD: depsrc-silent.mk,v 1.3 2020/08/29 17:34:21 rillig Exp $
2# 2#
3# Tests for the special source .SILENT in dependency declarations. 3# Tests for the special source .SILENT in dependency declarations,
 4# which hides the commands, no matter whether they are prefixed with
 5# '@' or not.
4 6
5# TODO: Implementation 7# Without the .SILENT, the commands 'echo one' and 'echo two' would be
6 8# written to stdout.
7all: 9all: .SILENT
8 @:; 10 echo one
 11 echo two
 12 @echo three

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-begin.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/deptgt-begin.mk 2020/08/16 14:25:16 1.2
+++ src/usr.bin/make/unit-tests/deptgt-begin.mk 2020/08/29 17:34:21 1.3
@@ -1,8 +1,13 @@ @@ -1,8 +1,13 @@
1# $NetBSD: deptgt-begin.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ 1# $NetBSD: deptgt-begin.mk,v 1.3 2020/08/29 17:34:21 rillig Exp $
2# 2#
3# Tests for the special target .BEGIN in dependency declarations. 3# Tests for the special target .BEGIN in dependency declarations,
 4# which is a container for commands that are run before any other
 5# commands from the shell lines.
4 6
5# TODO: Implementation 7.BEGIN:
 8 : $@
6 9
7all: 10all:
8 @:; 11 : $@
 12
 13_!= echo : parse time 1>&2

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-end.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/deptgt-end.mk 2020/08/16 14:25:16 1.2
+++ src/usr.bin/make/unit-tests/deptgt-end.mk 2020/08/29 17:34:21 1.3
@@ -1,8 +1,13 @@ @@ -1,8 +1,13 @@
1# $NetBSD: deptgt-end.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ 1# $NetBSD: deptgt-end.mk,v 1.3 2020/08/29 17:34:21 rillig Exp $
2# 2#
3# Tests for the special target .END in dependency declarations. 3# Tests for the special target .END in dependency declarations,
 4# which is run after making the desired targets.
4 5
5# TODO: Implementation 6.BEGIN:
 7 : $@
 8
 9.END:
 10 : $@
6 11
7all: 12all:
8 @:; 13 : $@