Provide a 'tinderbox' target that compiles enough of FreeBSD that

a developer can rest reasonably assured that the tinderbox will not
be broken.  This target leverages most of 'universe' but will exit
non-zero and output a summary at the end.

"make tinderbox"
This commit is contained in:
Alfred Perlstein 2008-12-01 00:45:51 +00:00
parent 6647711279
commit 4bb9ca574c

View File

@ -267,6 +267,10 @@ make: .PHONY
${MMAKE} all && \ ${MMAKE} all && \
${MMAKE} install DESTDIR=${MAKEPATH} BINDIR= ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
tinderbox:
cd ${.CURDIR} && \
DOING_TINDERBOX=YES ${MAKE} ${JFLAG} universe
# #
# universe # universe
# #
@ -274,14 +278,24 @@ make: .PHONY
# with a reasonable chance of success, regardless of how old your # with a reasonable chance of success, regardless of how old your
# existing system is. # existing system is.
# #
.if make(universe) .if make(universe) || make(tinderbox)
TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v
.if defined(DOING_TINDERBOX)
FAILFILE=tinderbox.failed
MAKEFAIL=tee -a ${FAILFILE}
.else
MAKEFAIL=cat
.endif
universe: universe_prologue universe: universe_prologue
universe_prologue: universe_prologue:
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}" @echo ">>> make universe started on ${STARTTIME}"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
.if defined(DOING_TINDERBOX)
rm -f ${FAILFILE}
.endif
.for target in ${TARGETS} .for target in ${TARGETS}
KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \
find [A-Z]*[A-Z] -type f -maxdepth 0 \ find [A-Z]*[A-Z] -type f -maxdepth 0 \
@ -296,15 +310,15 @@ universe_${target}:
${MAKE} ${JFLAG} buildworld \ ${MAKE} ${JFLAG} buildworld \
TARGET=${target} \ TARGET=${target} \
> _.${target}.buildworld 2>&1 || \ > _.${target}.buildworld 2>&1 || \
echo "${target} world failed," \ (echo "${target} world failed," \
"check _.${target}.buildworld for details") "check _.${target}.buildworld for details" | ${MAKEFAIL}))
@echo ">> ${target} buildworld completed on `LC_ALL=C date`" @echo ">> ${target} buildworld completed on `LC_ALL=C date`"
.endif .endif
.if exists(${.CURDIR}/sys/${target}/conf/NOTES) .if exists(${.CURDIR}/sys/${target}/conf/NOTES)
@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
echo "${target} 'make LINT' failed," \ (echo "${target} 'make LINT' failed," \
"check _.${target}.makeLINT for details") "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
.endif .endif
.for kernel in ${KERNCONFS} .for kernel in ${KERNCONFS}
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
@ -312,8 +326,8 @@ universe_${target}:
TARGET=${target} \ TARGET=${target} \
KERNCONF=${kernel} \ KERNCONF=${kernel} \
> _.${target}.${kernel} 2>&1 || \ > _.${target}.${kernel} 2>&1 || \
echo "${target} ${kernel} kernel failed," \ (echo "${target} ${kernel} kernel failed," \
"check _.${target}.${kernel} for details") "check _.${target}.${kernel} for details"| ${MAKEFAIL}))
.endfor .endfor
@echo ">> ${target} completed on `LC_ALL=C date`" @echo ">> ${target} completed on `LC_ALL=C date`"
.endfor .endfor
@ -323,4 +337,11 @@ universe_epilogue:
@echo ">>> make universe completed on `LC_ALL=C date`" @echo ">>> make universe completed on `LC_ALL=C date`"
@echo " (started ${STARTTIME})" @echo " (started ${STARTTIME})"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
.if defined(DOING_TINDERBOX)
@if [ -e ${FAILFILE} ] ; then \
echo "Tinderbox failed:" ;\
cat ${FAILFILE} ;\
exit 1 ;\
fi
.endif
.endif .endif