1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

universe: allow moving build logs to UNIVERSE_LOGDIR

This allows `make universe` or `make tinderbox`
to build from a read-only src tree.

Reviewed by:	ziaee, imp, delphij
Approved by:	lwhsu (mentor), emaste (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55566
This commit is contained in:
Siva Mahadevan
2026-05-20 16:05:53 -04:00
parent d7cde43f95
commit 02ef0b6d76
2 changed files with 14 additions and 10 deletions
+8 -9
View File
@@ -599,8 +599,9 @@ targets: .PHONY
.endfor
.endfor
UNIVERSE_LOGDIR?=${.CURDIR}
.if defined(DOING_TINDERBOX)
FAILFILE=${.CURDIR}/_.tinderbox.failed
FAILFILE=${UNIVERSE_LOGDIR}/_.tinderbox.failed
MAKEFAIL=tee -a ${FAILFILE}
.else
MAKEFAIL=cat
@@ -612,9 +613,7 @@ universe_prologue: .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
@echo "--------------------------------------------------------------"
.if defined(DOING_TINDERBOX)
@rm -f ${FAILFILE}
.endif
universe-toolchain: .PHONY universe_prologue
@echo "--------------------------------------------------------------"
@@ -630,9 +629,9 @@ universe-toolchain: .PHONY universe_prologue
TOOLS_PREFIX_UNDEF= \
kernel-toolchain \
MK_LLVM_TARGET_ALL=yes \
> _.${.TARGET} 2>&1 || \
> ${UNIVERSE_LOGDIR}/_.${.TARGET} 2>&1 || \
(echo "${.TARGET} failed," \
"check _.${.TARGET} for details" | \
"check ${UNIVERSE_LOGDIR}/_.${.TARGET} for details" | \
${MAKEFAIL}; false)
@if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \
echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \
@@ -716,9 +715,9 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY
TARGET=${target} \
TARGET_ARCH=${target_arch} \
${MAKE_PARAMS_${target_arch}} \
> _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
> ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
(echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
"check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
"check ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
${MAKEFAIL}))
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
.endfor
@@ -775,9 +774,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \
KERNCONF=${kernel} \
> _.${TARGET}.${kernel} 2>&1 || \
> ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} 2>&1 || \
(echo "${TARGET} ${kernel} kernel failed," \
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
"check ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`"
.endfor
.for target_arch in ${TARGET_ARCHES_${TARGET}}
+6 -1
View File
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd April 28, 2026
.Dd May 20, 2026
.Dt BUILD 7
.Os
.Sh NAME
@@ -958,6 +958,11 @@ Only build worlds for each supported architecture.
Only build kernels for each supported architecture.
.It Va WITHOUT_KERNELS
Only build worlds for each supported architecture.
.It Va UNIVERSE_LOGDIR
Write all build logs to this directory for each supported architecture.
When invoking
.Cm tinderbox ,
also write the summary of all failed targets to this directory.
.It Va UNIVERSE_TARGET
Execute the specified
.Xr make 1