From 16892c7713d776eb02e3a022e2663361b5bf9274 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 9 May 2017 20:21:58 +0000 Subject: [PATCH] Support -DWORLDFAST to skip all build steps up to 'libraries' and 'everything'. This allows for building the world against the already-created host/sysroot environment. It is not overly useful outside of cases of large-impact changes such as a testing a new compiler. It will allow quickly getting back to an error in the target-phases of the build where a new compiler is being used. Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 10 +++++++++- share/man/man7/build.7 | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ba3d07c2fac7..85612251861d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -302,6 +302,11 @@ CLEANDIR= clean cleandepend CLEANDIR= cleandir .endif +.if defined(WORLDFAST) +NO_CLEAN= t +NO_OBJ= t +.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 @@ -831,6 +836,7 @@ everything: .PHONY ${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all WMAKE_TGTS= +.if !defined(WORLDFAST) WMAKE_TGTS+= _worldtmp _legacy .if empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= _bootstrap-tools @@ -841,7 +847,9 @@ WMAKE_TGTS+= _obj .endif WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _compiler-metadata -WMAKE_TGTS+= _includes _libraries +WMAKE_TGTS+= _includes +.endif +WMAKE_TGTS+= _libraries WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build${libcompat} diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 540084189c1e..d65591d8ae03 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -617,6 +617,16 @@ target. If set, the update process does not update the www tree as part of the .Dq make update target. +.It Va WORLDFAST +If set, the build target +.Cm buildworld +defaults to setting +.Va NO_CLEAN , +.Va NO_OBJ , +and will skip most bootstrap phases. +It will only bootstrap libraries and build all of userland. +This option should be used only when it is known that none of the bootstrap +needs changed and that no new directories have been connected to the build. .El .Pp Builds under directory