Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): add loud target to the .SIL...
details: https://anonhg.NetBSD.org/src/rev/578a853730c8
branches: trunk
changeset: 946089:578a853730c8
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 15 20:49:20 2020 +0000
description:
make(1): add loud target to the .SILENT test
diffstat:
usr.bin/make/unit-tests/deptgt-silent.exp | 2 ++
usr.bin/make/unit-tests/deptgt-silent.mk | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 95868184541f -r 578a853730c8 usr.bin/make/unit-tests/deptgt-silent.exp
--- a/usr.bin/make/unit-tests/deptgt-silent.exp Sun Nov 15 20:47:01 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt-silent.exp Sun Nov 15 20:49:20 2020 +0000
@@ -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
diff -r 95868184541f -r 578a853730c8 usr.bin/make/unit-tests/deptgt-silent.mk
--- a/usr.bin/make/unit-tests/deptgt-silent.mk Sun Nov 15 20:47:01 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt-silent.mk Sun Nov 15 20:49:20 2020 +0000
@@ -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.'
Home |
Main Index |
Thread Index |
Old Index