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:
@@ -599,8 +599,9 @@ targets: .PHONY
|
|||||||
.endfor
|
.endfor
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
UNIVERSE_LOGDIR?=${.CURDIR}
|
||||||
.if defined(DOING_TINDERBOX)
|
.if defined(DOING_TINDERBOX)
|
||||||
FAILFILE=${.CURDIR}/_.tinderbox.failed
|
FAILFILE=${UNIVERSE_LOGDIR}/_.tinderbox.failed
|
||||||
MAKEFAIL=tee -a ${FAILFILE}
|
MAKEFAIL=tee -a ${FAILFILE}
|
||||||
.else
|
.else
|
||||||
MAKEFAIL=cat
|
MAKEFAIL=cat
|
||||||
@@ -612,9 +613,7 @@ universe_prologue: .PHONY
|
|||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@echo ">>> make universe started on ${STARTTIME}"
|
@echo ">>> make universe started on ${STARTTIME}"
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
.if defined(DOING_TINDERBOX)
|
|
||||||
@rm -f ${FAILFILE}
|
@rm -f ${FAILFILE}
|
||||||
.endif
|
|
||||||
|
|
||||||
universe-toolchain: .PHONY universe_prologue
|
universe-toolchain: .PHONY universe_prologue
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@@ -630,9 +629,9 @@ universe-toolchain: .PHONY universe_prologue
|
|||||||
TOOLS_PREFIX_UNDEF= \
|
TOOLS_PREFIX_UNDEF= \
|
||||||
kernel-toolchain \
|
kernel-toolchain \
|
||||||
MK_LLVM_TARGET_ALL=yes \
|
MK_LLVM_TARGET_ALL=yes \
|
||||||
> _.${.TARGET} 2>&1 || \
|
> ${UNIVERSE_LOGDIR}/_.${.TARGET} 2>&1 || \
|
||||||
(echo "${.TARGET} failed," \
|
(echo "${.TARGET} failed," \
|
||||||
"check _.${.TARGET} for details" | \
|
"check ${UNIVERSE_LOGDIR}/_.${.TARGET} for details" | \
|
||||||
${MAKEFAIL}; false)
|
${MAKEFAIL}; false)
|
||||||
@if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \
|
@if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \
|
||||||
echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \
|
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=${target} \
|
||||||
TARGET_ARCH=${target_arch} \
|
TARGET_ARCH=${target_arch} \
|
||||||
${MAKE_PARAMS_${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," \
|
(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}))
|
${MAKEFAIL}))
|
||||||
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
|
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
|
||||||
.endfor
|
.endfor
|
||||||
@@ -775,9 +774,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
|
|||||||
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
|
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
|
||||||
${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \
|
${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \
|
||||||
KERNCONF=${kernel} \
|
KERNCONF=${kernel} \
|
||||||
> _.${TARGET}.${kernel} 2>&1 || \
|
> ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} 2>&1 || \
|
||||||
(echo "${TARGET} ${kernel} kernel failed," \
|
(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`"
|
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`"
|
||||||
.endfor
|
.endfor
|
||||||
.for target_arch in ${TARGET_ARCHES_${TARGET}}
|
.for target_arch in ${TARGET_ARCHES_${TARGET}}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd April 28, 2026
|
.Dd May 20, 2026
|
||||||
.Dt BUILD 7
|
.Dt BUILD 7
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@@ -958,6 +958,11 @@ Only build worlds for each supported architecture.
|
|||||||
Only build kernels for each supported architecture.
|
Only build kernels for each supported architecture.
|
||||||
.It Va WITHOUT_KERNELS
|
.It Va WITHOUT_KERNELS
|
||||||
Only build worlds for each supported architecture.
|
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
|
.It Va UNIVERSE_TARGET
|
||||||
Execute the specified
|
Execute the specified
|
||||||
.Xr make 1
|
.Xr make 1
|
||||||
|
|||||||
Reference in New Issue
Block a user