META_MODE+filemon: Default -DNO_CLEAN enabled.

When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-04-14 22:00:33 +00:00
parent 4a2e0710e1
commit 473fda75dd
2 changed files with 18 additions and 1 deletions

View File

@ -144,6 +144,15 @@ CLEANDIR= clean cleandepend
CLEANDIR= cleandir CLEANDIR= cleandir
.endif .endif
.if ${MK_META_MODE} == "yes"
# If filemon is used then we can rely on the build being incremental-safe.
# The .meta files will also track the build command and rebuild should
# it change.
.if empty(.MAKE.MODE:Mnofilemon)
NO_CLEAN= t
.endif
.endif
LOCAL_TOOL_DIRS?= LOCAL_TOOL_DIRS?=
PACKAGEDIR?= ${DESTDIR}/${DISTDIR} PACKAGEDIR?= ${DESTDIR}/${DISTDIR}

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd March 29, 2016 .Dd April 14, 2016
.Dt BUILD 7 .Dt BUILD 7
.Os .Os
.Sh NAME .Sh NAME
@ -539,6 +539,14 @@ instead of
.Dq make cleandir . .Dq make cleandir .
.It Va NO_CLEAN .It Va NO_CLEAN
If set, no object tree files are cleaned at all. If set, no object tree files are cleaned at all.
This is the default when
.Va WITH_META_MODE
is used with
.Xr filemon 4
loaded.
See
.Xr src.conf 5
for more details.
Setting Setting
.Va NO_CLEAN .Va NO_CLEAN
implies implies