At 10:19 AM -0700 2/15/04, M. Warner Losh wrote:
In message: <[EMAIL PROTECTED]>
Garance A Drosihn <[EMAIL PROTECTED]> writes:
: realclean :
: rm -Rf ${.OBJDIR}/*
I'd make that be more like:
realclean :
@chflags -R 0 ${.OBJDIR}/*
@rm -Rf ${.OBJDIR}/*
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}/*
The more foolproof/reliable we can make it for everybody, the
more I like it. I'll see your chflags, and add one redirection
of stderr so the user won't see errors that we don't really
care about:
realclean :
@rm -Rf ${.OBJDIR}/* 2>/dev/null
@chflags -R 0 ${.OBJDIR}/*
@rm -Rf ${.OBJDIR}/*
Any errors that showed up on the first 'rm' should also show up
on the second 'rm', so we shouldn't really lose any useful info.
I might also try wrapping the second two commands in an 'if', so
they will be executed only if there's still something left over
after the first 'rm'.
--
Garance Alistair Drosehn = [EMAIL PROTECTED]
Senior Systems Programmer or [EMAIL PROTECTED]
Rensselaer Polytechnic Institute or [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"