Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 11:56:41 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        marcel@xcllnt.net
Cc:        drosih@rpi.edu
Subject:   Re: Adding 'realclean' target to /usr/src/Makefile
Message-ID:  <20040215.115641.52781677.imp@bsdimp.com>
In-Reply-To: <20040215185351.GB65052@dhcp01.pn.xcllnt.net>
References:  <p0602040fbc54cd0d3342@[128.113.24.47]> <20040215.101900.20429400.imp@bsdimp.com> <20040215185351.GB65052@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040215185351.GB65052@dhcp01.pn.xcllnt.net>
            Marcel Moolenaar <marcel@xcllnt.net> writes:
: On Sun, Feb 15, 2004 at 10:19:00AM -0700, M. Warner Losh wrote:
: > In message: <p0602040fbc54cd0d3342@[128.113.24.47]>
: >             Garance A Drosihn <drosih@rpi.edu> writes:
: > : realclean :
: > : 	rm -Rf ${.OBJDIR}/*
: > 
: > I'd make that be more like:
: > 
: > realclean :
: > 	@chflags -R 0 ${.OBJDIR}/*
: > 	@rm -Rf ${.OBJDIR}/*
: > 
: > since sometimes you wind up files that have flags set on them.
: 
: Sounds like a bug to me. Do you have examples?

libc.so.4 in the installed libraries in MAKEOBJDIRPREFIX if you have a
really old obj tree.  This is supposed to be foolproof, no?

: > If you can tolerate errors in the output, the following is faster
: > because the chflags has lots less work to do:
: > 
: > realclean :
: > 	@rm -Rf ${.OBJDIR}/*
: > 	@chflags -R 0 ${.OBJDIR}/*
: > 	@rm -Rf ${.OBJDIR}/*
: 
: Since there should be no flags on files in the object directory in
: principle, the errors are probably useful to track down where these
: get set.
: 
: In any case: I think a realclean target based on a recursive rm is
: generally useful. Adding a chflags in there makes it more foolproof
: and thus ideal for UPDATING and other user oriented documentation.

Yup.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040215.115641.52781677.imp>