NetBSD Problem Report #45356
From apb@cequrux.com Sun Sep 11 09:16:59 2011
Return-Path: <apb@cequrux.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id EE72E63BB48
for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Sep 2011 09:16:58 +0000 (UTC)
Message-Id: <20110911091650.9F5C42C5E071@apb-laptoy.apb.alt.za>
Date: Sun, 11 Sep 2011 09:16:50 +0000 (UTC)
From: apb@cequrux.com
Reply-To: apb@cequrux.com
To: gnats-bugs@gnats.NetBSD.org
Subject: make .SILENT doesn't work with "-j"
X-Send-Pr-Version: 3.95
>Number: 45356
>Category: bin
>Synopsis: make .SILENT doesn't work with "-j"
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: rillig
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 11 09:20:00 +0000 2011
>Closed-Date: Sat Feb 12 11:17:39 +0000 2022
>Last-Modified: Sat Feb 12 11:17:39 +0000 2022
>Originator: Alan Barrett
>Release: NetBSD 5.99.55
>Organization:
Not much
>Environment:
System: NetBSD 5.99.55
Architecture: i386
Machine: i386
>Description:
make(1)'s "-j" command line flag causes the ".SILENT" attribute
to be ignored for command lines that begin with "-".
>How-To-Repeat:
$ cat test.mk
.SILENT:
test: .PHONY
@echo testing 1
-echo testing 2
echo testing 3
$ make -f test.mk test
testing 1
testing 2
testing 3
$ make -f test.mk -j1 test
testing 1
echo testing 2
testing 2
testing 3
That "echo testing 2" should have been suppressed by the ".SILENT"
attribute.
>Fix:
>Release-Note:
>Audit-Trail:
From: "Alan Barrett" <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45356 CVS commit: src/share/mk
Date: Fri, 23 Sep 2011 21:13:15 +0000
Module Name: src
Committed By: apb
Date: Fri Sep 23 21:13:14 UTC 2011
Modified Files:
src/share/mk: bsd.clean.mk
Log Message:
* use a :M* modifier when testing whether the expanded list of
files is empty. Sometimes the variable contains one or more spaces,
and testing against "" gave the wrong result, but applying the
:M* modifier discards the spaces. This should fix PR 45396.
* Instead of using "-" to ignore the exit status from the rm command,
use ||true. This should work around the bug in PR 45356, but that
bug is not fixed.
* Suppress the ${MKMSG} command with .if 0. People who build with
MAKEVERBOSE=1 don't want to see the message, and people who build
with MAKEVERBOSE=2 or higher will see the actual rm command. The
message may be useful for debugging this makefile itself, so it's
only disabled, not deleted.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/mk/bsd.clean.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: bin-bug-people->rillig
Responsible-Changed-By: rillig@NetBSD.org
Responsible-Changed-When: Sat, 12 Feb 2022 00:54:57 +0000
Responsible-Changed-Why:
I'll take this one.
From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45356 CVS commit: src
Date: Sat, 12 Feb 2022 01:15:18 +0000
Module Name: src
Committed By: rillig
Date: Sat Feb 12 01:15:18 UTC 2022
Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile
Added Files:
src/usr.bin/make/unit-tests: deptgt-silent-jobs.exp
deptgt-silent-jobs.mk
Log Message:
tests/make: demonstrate bug for .SILENT in jobs mode (since 2003)
Reported 2011 in PR#45356.
To generate a diff of this commit:
cvs rdiff -u -r1.1186 -r1.1187 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.307 -r1.308 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/deptgt-silent-jobs.exp \
src/usr.bin/make/unit-tests/deptgt-silent-jobs.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45356 CVS commit: src/usr.bin/make
Date: Sat, 12 Feb 2022 11:14:48 +0000
Module Name: src
Committed By: rillig
Date: Sat Feb 12 11:14:48 UTC 2022
Modified Files:
src/usr.bin/make: job.c
src/usr.bin/make/unit-tests: deptgt-silent-jobs.exp
deptgt-silent-jobs.mk sh-flags.exp
Log Message:
make: fix echoing of command with '-' in silent target in jobs mode
Since job.c 1.83 from 2003-12-20, the command had been echoed even if
the target had the attribute '.SILENT'.
In sh-flags.exp, each removed 'echo' command is below a target name
matching the pattern 'opt-?j????-tgt-??s-cmd-?i?', which means that the
target was marked as silent, either through a global '.SILENT'
declaration or the command line option '-s' or the attribute '.SILENT'
on the target.
Reported by Alan Barrett in PR#45356.
To generate a diff of this commit:
cvs rdiff -u -r1.451 -r1.452 src/usr.bin/make/job.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-silent-jobs.exp \
src/usr.bin/make/unit-tests/deptgt-silent-jobs.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/sh-flags.exp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sat, 12 Feb 2022 11:17:39 +0000
State-Changed-Why:
Fixed for NetBSD 10, thanks for the PR.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.