NetBSD Problem Report #52089
From kre@munnari.OZ.AU Sun Mar 19 03:02:22 2017
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 5E9CA7A21A
for <gnats-bugs@www.NetBSD.org>; Sun, 19 Mar 2017 03:02:22 +0000 (UTC)
Message-Id: <201703190302.v2J32ASV003122@andromeda.noi.kre.to>
Date: Sun, 19 Mar 2017 10:02:10 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@www.NetBSD.org
Subject: Change the effect of "make clean" slightly
X-Send-Pr-Version: 3.95
>Number: 52089
>Category: toolchain
>Synopsis: Change the effect of "make clean" slightly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Mar 19 03:05:00 +0000 2017
>Last-Modified: Sun Mar 19 12:45:00 +0000 2017
>Originator: Robert Elz
>Release: NetBSD 7.99.65 (irrelevant, applies to all)
>Organization:
>Environment:
System: NetBSD andromeda.noi.kre.to 7.99.43 NetBSD 7.99.43 (VBOX64-1.2-20161202) #21: Sat Dec 3 00:43:51 ICT 2016 kre@magnolia.noi.kre.to:/usr/obj/current/kernels/amd64/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
Currently "make clean" does not clean all files generated by
"make" - "make distclean" is needed to remove some of them.
(In particular, generated man page files)
It would be better to have "make clean" remove everything added
by "make", and "make distclean" clean that, plus the files added
by "make depend", that's more consistent, and easier to
understand.
>How-To-Repeat:
By inspection, or just by using the commands.
>Fix:
This is untested, but I assume it would be something like ...
--- bsd.man.mk 2015-10-20 00:08:11.000000000 +0700
+++ bsd.man.mk-better-clean 2017-03-19 09:59:39.000000000 +0700
@@ -277,13 +277,13 @@
.if !empty(MAN) && (${MKMAN} != "no")
.if (${MKCATPAGES} != "no")
-CLEANDIRFILES+= ${CATPAGES}
+CLEANFILES+= ${CATPAGES}
.endif
.if !empty(MANSUFFIX)
-CLEANDIRFILES+= ${MANPAGES} ${CATPAGES:S/${MANSUFFIX}$//}
+CLEANFILES+= ${MANPAGES} ${CATPAGES:S/${MANSUFFIX}$//}
.endif
.if ${MKHTML} != "no"
-CLEANDIRFILES+= ${HTMLPAGES}
+CLEANFILES+= ${HTMLPAGES}
.endif
.endif
# (XXX ${CATPAGES:S...} cleans up old .catN files where .catN.gz now used)
>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/52089
Date: Sun, 19 Mar 2017 06:29:01 +0000
+Atffile
From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/52089: Change the effect of "make clean" slightly
Date: Sun, 19 Mar 2017 11:51:04 +0100
On Sun, Mar 19, 2017 at 03:05:00AM +0000, kre@munnari.OZ.AU wrote:
> It would be better to have "make clean" remove everything added
> by "make", and "make distclean" clean that, plus the files added
> by "make depend", that's more consistent, and easier to
> understand.
Perfectly fine with me. Given that we don't even build cat pages by
default anymore and mandoc is much faster than groff ever was, it just
doesn't make sense to me to special case them.
Joerg
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/52089
Date: Sun, 19 Mar 2017 19:42:51 +0700
Date: Sun, 19 Mar 2017 06:30:01 +0000 (UTC)
From: coypu@SDF.ORG
Message-ID: <20170319063001.14D8C7A2B3@mollari.NetBSD.org>
| +Atffile
I would assume in that case, Kyuafile as well.
In either case, Atffile.tmp and Kyuafile.tmp (if they happen to be
left around, due to make failing or being interrupted just at the wrong
time) should certainly be removed by "make clean"
The same is true for the .tmp files that exist briefly when building ATF
test files for t_*.sh scripts, they ought also be cleaned by "make clean".
I'd assume that no-one has noticed that it takes a "make distclean" (or
"make cleandir" which is the same thing) to remove all these .tmp files
as it is very rare for one to be left around by the normal build process
(I don't think I have ever see it happen.)
The one possibility to also move from "make distclean" to "make clean"
are info files - the 'remove what "make" makes' philosophy would suggest
they should be cleaned by "make clean" as well.
kre
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.