From owner-freebsd-current Thu Oct 2 23:39:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA23477 for current-outgoing; Thu, 2 Oct 1997 23:39:54 -0700 (PDT) Received: from silvia.HIP.Berkeley.EDU (ala-ca14-03.ix.netcom.com [204.32.168.67]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA23472 for ; Thu, 2 Oct 1997 23:39:50 -0700 (PDT) Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.8.7/8.6.9) id XAA12795; Thu, 2 Oct 1997 23:39:49 -0700 (PDT) Date: Thu, 2 Oct 1997 23:39:49 -0700 (PDT) Message-Id: <199710030639.XAA12795@silvia.HIP.Berkeley.EDU> To: current@freebsd.org Subject: cleanworld From: asami@cs.berkeley.edu (Satoshi Asami) Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Seems a lot of people are unable to understand the immutable flag bit, how about this? Satoshi P.S. This patch is relative to the 2.2 branch. ------- Index: Makefile =================================================================== RCS file: /usr/cvs/src/Makefile,v retrieving revision 1.109.2.19 diff -u -r1.109.2.19 Makefile --- Makefile 1997/09/28 16:33:05 1.109.2.19 +++ Makefile 1997/10/03 06:38:59 @@ -23,6 +23,7 @@ # The intended user-driven targets are: # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" +# cleanworld - remove the temporary build tree for "buildworld" # world - buildworld + installworld # update - convenient way to update your source tree (eg: sup/cvs) # most - build user commands, no libraries or include files @@ -194,6 +195,17 @@ IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} # +# cleanworld +# +# Deletes the temporary build tree. +# +cleanworld: +.if exists(${WORLDTMP}) + chflags -R noschg ${WORLDTMP}/ + rm -rf ${WORLDTMP} +.endif + +# # buildworld # # Attempt to rebuild the entire system, with reasonable chance of @@ -205,9 +217,7 @@ @echo "--------------------------------------------------------------" @echo " Cleaning up the temporary build tree" @echo "--------------------------------------------------------------" - mkdir -p ${WORLDTMP} - chflags -R noschg ${WORLDTMP}/ - rm -rf ${WORLDTMP} + cd ${.CURDIR} && ${MAKE} cleanworld .endif @echo @echo "--------------------------------------------------------------"