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 tests/make: remove redundant 'echo' ...



details:   https://anonhg.NetBSD.org/src/rev/fe99c5842874
branches:  trunk
changeset: 361105:fe99c5842874
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Feb 09 21:24:29 2022 +0000

description:
tests/make: remove redundant 'echo' from variable assignments

Before main.c 1.231 from 2014-09-09, a variable assignment using the
operator '!=' generated a warning "Couldn't read shell's output" if the
output of the command was empty.  The simplest way to suppress this
wrong warning was to add an empty 'echo' to the command.  This hack is
no longer needed.

diffstat:

 usr.bin/make/unit-tests/Makefile           |  4 ++--
 usr.bin/make/unit-tests/objdir-writable.mk |  5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 31b8db7cee9b -r fe99c5842874 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Wed Feb 09 21:09:24 2022 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Wed Feb 09 21:24:29 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.306 2022/02/09 21:09:24 rillig Exp $
+# $NetBSD: Makefile,v 1.307 2022/02/09 21:24:29 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -653,7 +653,7 @@
 .endif
 # make sure it exists
 .if !exist(${TMPDIR})
-x!= echo; mkdir -p ${TMPDIR}
+_!= mkdir -p ${TMPDIR}
 .endif
 
 MAKE_TEST_ENV= MALLOC_OPTIONS="JA"     # for jemalloc 100
diff -r 31b8db7cee9b -r fe99c5842874 usr.bin/make/unit-tests/objdir-writable.mk
--- a/usr.bin/make/unit-tests/objdir-writable.mk        Wed Feb 09 21:09:24 2022 +0000
+++ b/usr.bin/make/unit-tests/objdir-writable.mk        Wed Feb 09 21:24:29 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: objdir-writable.mk,v 1.6 2022/02/09 21:09:24 rillig Exp $
+# $NetBSD: objdir-writable.mk,v 1.7 2022/02/09 21:24:29 rillig Exp $
 
 # test checking for writable objdir
 
@@ -14,7 +14,8 @@
 all: no-objdir ro-objdir explicit-objdir
 
 # make it now
-x!= echo; mkdir -p ${RO_OBJDIR};  chmod 555 ${RO_OBJDIR}
+_!=    mkdir -p ${RO_OBJDIR}
+_!=    chmod 555 ${RO_OBJDIR}
 
 .END: rm-objdir
 rm-objdir:



Home | Main Index | Thread Index | Old Index