From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 14 23:42:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C1C216A4CE; Sat, 14 Feb 2004 23:42:09 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BDE843D1F; Sat, 14 Feb 2004 23:42:09 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i1F7g8nI014387; Sun, 15 Feb 2004 02:42:08 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Sun, 15 Feb 2004 02:42:07 -0500 To: hackers@FreeBSD.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: ru@FreeBSD.org Subject: Adding 'realclean' target to /usr/src/Makefile X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2004 07:42:09 -0000 In the instructions I am writing up for a sparc64 change, I wrote that people should: rm -Rf /usr/obj/usr/src/* to make sure they got rid of everything in the previous buildworld. Some developers reminded me that this isn't always the right thing to do (depending on symlinks or on various settings the user may have set). Some suggested 'rm /usr/obj/*', but I do not like that because I have other things in /usr/obj that I don't want to blow away. And besides, even that can be wrong if the user has set something like MAKEOBJDIRPREFIX. It occurs to me that the simple, reliable solution to this is to add a 'realclean' target to /usr/src/Makefile, such as: realclean : rm -Rf ${.OBJDIR}/* Another option is to put that into /usr/src/Makefile as the 'cleandir' target. Right now that 'cleandir' target goes to the extra work of looping through all subdirectories, and having *those* Makefiles do whatever they want for a 'cleandir' target. This includes printing out all kinds of status messages, and frankly seems like a waste of time to me. I'd rather type in the 'rm' command by hand then wait for that target, but I expect that behavior serves a purpose, so I'm suggesting the new target. Seeing that this is in /usr/src/Makefile, and that it's a simple two-line change, I'm sure there's at least a hundred developers who will have strong opinions about it. So, should I do it, or will I be beaten around the head and shoulders for suggesting it? -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu