diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2,7 +2,7 @@ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir -# -DNO_CLEAN do not clean at all +# -DWITHOUT_CLEAN do not clean at all # -DDB_FROM_SRC use the user/group databases in src/etc instead of # the system database when installing. # -DNO_SHARE do not go into share subdir diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 8, 2025 +.Dd August 20, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -801,6 +801,9 @@ instead of .Dq make cleandir . .It Va NO_CLEAN +The legacy name for +.Va WITHOUT_CLEAN . +.It Va WITHOUT_CLEAN If set, no object tree files are cleaned at all. This is the default when .Va WITH_META_MODE @@ -811,12 +814,34 @@ .Xr src.conf 5 for more details. Setting -.Va NO_CLEAN +.Va WITHOUT_CLEAN implies .Va NO_KERNELCLEAN , so when -.Va NO_CLEAN +.Va WITHOUT_CLEAN is set no kernel objects are cleaned either. +.Pp +Note that some circumstances will cause the object tree to be cleaned despite +having set the +.Va WITHOUT_CLEAN +option. +If a new +.Dq build epoch +is recorded in +.Pa .clean_build_epoch +in the root of the source tree that does not match the epoch recorded in the +file of the same name in the object tree, then a clean will be performed. +Build epochs are expected to be used sparingly to handle changes that touch +large parts of the tree in ways that +.Xr make 1 +cannot handle adequately without the assistance of +.Va META_MODE +and +.Xr filemon 4 . +.Pp +The +.Pa .clean_build_epoch +will not cause the kernel object tree to be cleaned. .It Va NO_CTF If set, the build process does not run the DTrace CTF conversion tools on built objects. @@ -859,7 +884,7 @@ If set, the build target .Cm buildworld defaults to setting -.Va NO_CLEAN , +.Va WITHOUT_CLEAN , .Va NO_OBJWALK , and will skip most bootstrap phases. It will only bootstrap libraries and build all of userland.