Deleted Added
full compact
Makefile (125885) Makefile (126024)
1#
1#
2# $FreeBSD: head/Makefile 125885 2004-02-16 20:18:25Z gad $
2# $FreeBSD: head/Makefile 126024 2004-02-19 21:09:58Z gad $
3#
4# The user-driven targets are:
5#
6# universe - *Really* build *everything* (buildworld and
7# all kernels on all architectures).
8# buildworld - Rebuild *everything*, including glue to help do
9# upgrades.
10# installworld - Install everything built by "buildworld".

--- 88 unchanged lines hidden (view full) ---

99#
100.if defined(ALWAYS_CHECK_MAKE)
101${TGTS}: upgrade_checks
102.else
103buildworld: upgrade_checks
104.endif
105
106#
3#
4# The user-driven targets are:
5#
6# universe - *Really* build *everything* (buildworld and
7# all kernels on all architectures).
8# buildworld - Rebuild *everything*, including glue to help do
9# upgrades.
10# installworld - Install everything built by "buildworld".

--- 88 unchanged lines hidden (view full) ---

99#
100.if defined(ALWAYS_CHECK_MAKE)
101${TGTS}: upgrade_checks
102.else
103buildworld: upgrade_checks
104.endif
105
106#
107# This 'realclean' target is not included in TGTS, because it is not
108# a recursive target. All of the work for it is done right here.
109# The first 'rm' will usually remove all files and directories. If
110# it does not, then there are probably some files with chflags set.
111# Unset all special chflags, and try the 'rm' a second time.
112realclean :
113 -rm -Rf ${.OBJDIR}/* 2>/dev/null
114 @-if [ "`echo ${.OBJDIR}/*`" != "${.OBJDIR}/*" ] ; then \
115 echo "chflags -R 0 ${.OBJDIR}/*" ; \
116 chflags -R 0 ${.OBJDIR}/* ; \
117 echo "rm -Rf ${.OBJDIR}/*" ; \
118 rm -Rf ${.OBJDIR}/* ; \
119 fi
107# This 'realclean' target is not included in TGTS, because it is not a
108# recursive target. All of the work for it is done right here. It is
109# expected that BW_CANONICALOBJDIR == the CANONICALOBJDIR as would be
110# created by bsd.obj.mk, except that we don't want to .include that file
111# in this makefile.
112#
113# In the following, the first 'rm' in a series will usually remove all
114# files and directories. If it does not, then there are probably some
115# files with chflags set, so this unsets them and tries the 'rm' a
116# second time. There are situations where this target will be cleaning
117# some directories via more than one method, but that duplication is
118# needed to correctly handle all the possible situations.
119#
120BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
121realclean:
122.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
123.if exists(${BW_CANONICALOBJDIR}/)
124 -rm -rf ${BW_CANONICALOBJDIR}/*
125 chflags -R 0 ${BW_CANONICALOBJDIR}
126 rm -rf ${BW_CANONICALOBJDIR}/*
127.endif
128 # To be safe in this case, fall back to a 'make cleandir'
129 @cd ${.CURDIR}; ${_MAKE} cleandir
130.else
131 -rm -rf ${.OBJDIR}/*
132 chflags -R 0 ${.OBJDIR}
133 rm -rf ${.OBJDIR}/*
134.endif
120
121#
122# Handle the user-driven targets, using the source relative mk files.
123#
124
125${TGTS}:
126 @cd ${.CURDIR}; \
127 ${_MAKE} ${.TARGET}

--- 121 unchanged lines hidden ---
135
136#
137# Handle the user-driven targets, using the source relative mk files.
138#
139
140${TGTS}:
141 @cd ${.CURDIR}; \
142 ${_MAKE} ${.TARGET}

--- 121 unchanged lines hidden ---