Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157263860
D32978.id102673.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D32978.id102673.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
#
# $FreeBSD$
#
-# The user-driven targets are:
+# The common user-driven targets are (for a complete list, see build(7)):
#
# universe - *Really* build *everything* (buildworld and
# all kernels on all architectures). Define
@@ -148,8 +148,8 @@
TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
check check-old check-old-dirs check-old-files check-old-libs \
- checkdpadd checkworld clean cleandepend cleandir cleanworld \
- cleanuniverse \
+ checkdpadd checkworld clean cleandepend cleandir cleankernel \
+ cleanworld cleanuniverse \
delete-old delete-old-dirs delete-old-files delete-old-libs \
depend distribute distributekernel distributekernel.debug \
distributeworld distrib-dirs distribution doxygen \
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -3422,18 +3422,20 @@
#
.if make(cleanworld)
BW_CANONICALOBJDIR:=${OBJTOP}/
+.elif make(cleankernel)
+BW_CANONICALOBJDIR:=${KRNLOBJDIR}/${KERNCONF}/
.elif make(cleanuniverse)
BW_CANONICALOBJDIR:=${OBJROOT}
.if ${MK_UNIFIED_OBJDIR} == "no"
.error ${.TARGETS} only supported with WITH_UNIFIED_OBJDIR enabled.
.endif
.endif
-cleanworld cleanuniverse: .PHONY
+cleanworld cleanuniverse cleankernel: .PHONY
.if !empty(BW_CANONICALOBJDIR) && exists(${BW_CANONICALOBJDIR}) && \
${.CURDIR:tA} != ${BW_CANONICALOBJDIR:tA}
- -rm -rf ${BW_CANONICALOBJDIR}*
+ -(cd ${BW_CANONICALOBJDIR} && rm -rf *)
-chflags -R 0 ${BW_CANONICALOBJDIR}
- rm -rf ${BW_CANONICALOBJDIR}*
+ -(cd ${BW_CANONICALOBJDIR} && rm -rf *)
.endif
.if make(cleanworld) && ${MK_AUTO_OBJ} == "no" && \
(empty(BW_CANONICALOBJDIR) || ${.CURDIR:tA} == ${BW_CANONICALOBJDIR:tA})
Index: share/man/man7/build.7
===================================================================
--- share/man/man7/build.7
+++ share/man/man7/build.7
@@ -216,10 +216,15 @@
for cross builds and native builds with variable
.Va CROSS_BUILD_TESTING
set.
+.It Cm cleankernel
+Attempts to clean up targets built by a preceding
+.Cm buildkernel ,
+or similar step, built from the same source directory and
+.Va KERNCONF .
.It Cm cleanworld
Attempt to clean up targets built by a preceding
.Cm buildworld ,
-or similar step built from this source directory.
+or similar step, built from this source directory.
.It Cm cleanuniverse
When
.Va WITH_UNIFIED_OBJDIR
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 20, 8:38 PM (18 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33355987
Default Alt Text
D32978.id102673.diff (2 KB)
Attached To
Mode
D32978: cleankernel: A target to delete the kernel compile file
Attached
Detach File
Event Timeline
Log In to Comment