aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGarance A Drosehn <gad@FreeBSD.org>2004-02-16 20:18:25 +0000
committerGarance A Drosehn <gad@FreeBSD.org>2004-02-16 20:18:25 +0000
commit2047c5d32e107a14bf6edec3c2daac90b89b98f4 (patch)
tree61fad72c1d8c9f6ec8b93413b1830a78b2dfb20c /Makefile
parent5193980ced4c6222a6fd1cd9a032c8a568aaf9f0 (diff)
Notes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fccd360543c91..487535c593011 100644
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,21 @@ buildworld: upgrade_checks
.endif
#
+# This 'realclean' target is not included in TGTS, because it is not
+# a recursive target. All of the work for it is done right here.
+# The first 'rm' will usually remove all files and directories. If
+# it does not, then there are probably some files with chflags set.
+# Unset all special chflags, and try the 'rm' a second time.
+realclean :
+ -rm -Rf ${.OBJDIR}/* 2>/dev/null
+ @-if [ "`echo ${.OBJDIR}/*`" != "${.OBJDIR}/*" ] ; then \
+ echo "chflags -R 0 ${.OBJDIR}/*" ; \
+ chflags -R 0 ${.OBJDIR}/* ; \
+ echo "rm -Rf ${.OBJDIR}/*" ; \
+ rm -Rf ${.OBJDIR}/* ; \
+ fi
+
+#
# Handle the user-driven targets, using the source relative mk files.
#