Page MenuHomeFreeBSD

D22762.diff
No OneTemporary

D22762.diff

Index: head/Makefile.inc1
===================================================================
--- head/Makefile.inc1
+++ head/Makefile.inc1
@@ -441,9 +441,13 @@
.endif # !empty(SUBDIR_OVERRIDE)
.if defined(NOCLEAN)
-.warning NOCLEAN option is deprecated. Use NO_CLEAN instead.
-NO_CLEAN= ${NOCLEAN}
+.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN.
+MK_CLEAN:= no
.endif
+.if defined(NO_CLEAN)
+.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN.
+MK_CLEAN:= no
+.endif
.if defined(NO_CLEANDIR)
CLEANDIR= clean cleandepend
.else
@@ -451,7 +455,7 @@
.endif
.if defined(WORLDFAST)
-NO_CLEAN= t
+MK_CLEAN:= no
NO_OBJWALK= t
.endif
@@ -460,7 +464,7 @@
# The .meta files will also track the build command and rebuild should
# it change.
.if empty(.MAKE.MODE:Mnofilemon)
-NO_CLEAN= t
+MK_CLEAN:= no
.endif
.endif
.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes"
@@ -837,7 +841,7 @@
# timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times
# when the ABI breaks though that we want to force rebuilding WORLDTMP
# to get updated host tools.
-.if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \
+.if ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" && \
!defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \
!defined(_MKSHOWCONFIG)
# r318736 - ino64 major ABI breakage
@@ -869,7 +873,7 @@
.export NO_META_IGNORE_HOST_HEADERS
.endif # defined(_meta_mode_need_rebuild)
.endif # defined(OBJDIR_HOST_OSRELDATE)
-.endif # ${MK_META_MODE} == "yes" && defined(NO_CLEAN) ...
+.endif # ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" ...
# This is only used for META_MODE+filemon to track what the oldest
# __FreeBSD_version is in WORLDTMP. This purposely does NOT have
# a make dependency on /usr/include/osreldate.h as the file should
@@ -1013,7 +1017,7 @@
@echo "--------------------------------------------------------------"
@echo ">>> Rebuilding the temporary build tree"
@echo "--------------------------------------------------------------"
-.if !defined(NO_CLEAN)
+.if ${MK_CLEAN} == "yes"
rm -rf ${WORLDTMP}
.else
# Note: for delete-old we need to set $PATH to also include the host $PATH
@@ -1038,7 +1042,7 @@
.if ${USING_SYSTEM_LINKER} == "yes"
@rm -f ${WORLDTMP}/usr/bin/ld ${WORLDTMP}/usr/bin/ld.lld
.endif # ${USING_SYSTEM_LINKER} == "yes"
-.endif # !defined(NO_CLEAN)
+.endif # ${MK_CLEAN} == "yes"
@mkdir -p ${WORLDTMP}
@touch ${WORLDTMP}/${.TARGET}
# We can't use mtree to create the worldtmp directories since it may not be
@@ -1077,7 +1081,7 @@
${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
.endfor
_cleanobj:
-.if !defined(NO_CLEAN)
+.if ${MK_CLEAN} == "yes"
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.1: cleaning up the object tree"
@@ -1090,7 +1094,7 @@
.endif
.else
${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack
-.endif # !defined(NO_CLEAN)
+.endif # ${MK_CLEAN} == "yes"
_obj:
@echo
@echo "--------------------------------------------------------------"
@@ -1672,7 +1676,7 @@
-I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \
'${KERNCONFDIR}/${_kernel}'
.endif
-.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
+.if ${MK_CLEAN} == "yes" && !defined(NO_KERNELCLEAN)
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.1: cleaning up the object tree"
@@ -2478,7 +2482,7 @@
# kernel-toolchain skips _cleanobj, so handle cleaning up previous
# build-tools directories if needed.
-.if !defined(NO_CLEAN) && make(kernel-toolchain)
+.if ${MK_CLEAN} == "yes" && make(kernel-toolchain)
_bt_clean= ${CLEANDIR}
.endif
Index: head/Makefile.libcompat
===================================================================
--- head/Makefile.libcompat
+++ head/Makefile.libcompat
@@ -62,7 +62,7 @@
@echo "--------------------------------------------------------------"
@echo ">>> stage 4.3: building lib${libcompat} shim libraries"
@echo "--------------------------------------------------------------"
-.if !defined(NO_CLEAN)
+.if ${MK_CLEAN} == "yes"
rm -rf ${LIBCOMPATTMP}
.else
${_+_}@if [ -e "${LIBCOMPATTMP}" ]; then \
@@ -71,7 +71,7 @@
DESTDIR=${LIBCOMPATTMP} \
delete-old delete-old-libs >/dev/null; \
fi
-.endif # !defined(NO_CLEAN)
+.endif # MK_CLEAN == "yes"
mkdir -p ${LIBCOMPATTMP}/usr/include
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
Index: head/share/mk/src.opts.mk
===================================================================
--- head/share/mk/src.opts.mk
+++ head/share/mk/src.opts.mk
@@ -80,6 +80,7 @@
CLANG \
CLANG_BOOTSTRAP \
CLANG_IS_CC \
+ CLEAN \
CPP \
CROSS_COMPILER \
CRYPT \
Index: head/tools/build/options/WITHOUT_CLEAN
===================================================================
--- head/tools/build/options/WITHOUT_CLEAN
+++ head/tools/build/options/WITHOUT_CLEAN
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Do not clean before building world and/or kernel.

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 1, 5:40 AM (19 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34544497
Default Alt Text
D22762.diff (4 KB)

Event Timeline