Module Name:    src
Committed By:   rillig
Date:           Sun Nov 15 20:49:20 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: deptgt-silent.exp deptgt-silent.mk

Log Message:
make(1): add loud target to the .SILENT test


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-silent.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/deptgt-silent.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/deptgt-silent.exp
diff -u src/usr.bin/make/unit-tests/deptgt-silent.exp:1.2 src/usr.bin/make/unit-tests/deptgt-silent.exp:1.3
--- src/usr.bin/make/unit-tests/deptgt-silent.exp:1.2	Thu Sep 10 21:40:50 2020
+++ src/usr.bin/make/unit-tests/deptgt-silent.exp	Sun Nov 15 20:49:20 2020
@@ -1,3 +1,5 @@
+echo 'This is a loud command.'
+This is a loud command.
 This is not echoed because of the @.
 This is not echoed because of the .SILENT.
 exit status 0

Index: src/usr.bin/make/unit-tests/deptgt-silent.mk
diff -u src/usr.bin/make/unit-tests/deptgt-silent.mk:1.3 src/usr.bin/make/unit-tests/deptgt-silent.mk:1.4
--- src/usr.bin/make/unit-tests/deptgt-silent.mk:1.3	Thu Sep 10 21:40:50 2020
+++ src/usr.bin/make/unit-tests/deptgt-silent.mk	Sun Nov 15 20:49:20 2020
@@ -1,10 +1,15 @@
-# $NetBSD: deptgt-silent.mk,v 1.3 2020/09/10 21:40:50 rillig Exp $
+# $NetBSD: deptgt-silent.mk,v 1.4 2020/11/15 20:49:20 rillig Exp $
 #
 # Tests for the special target .SILENT in dependency declarations.
 
 .SILENT: all
 
-all:
+all: loud
 	@echo 'This is not echoed because of the @.'
 	# Without the .SILENT, the following command would be echoed.
 	echo 'This is not echoed because of the .SILENT.'
+
+# Demonstrate that the .SILENT only applies to the particular target.
+# This is unlike .DELETE_ON_ERROR, which is a global setting.
+loud: .PHONY
+	echo 'This is a loud command.'

Reply via email to