Changeset View
Changeset View
Standalone View
Standalone View
Makefile
Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | |||||
.if defined(UNIVERSE_TARGET) | .if defined(UNIVERSE_TARGET) | ||||
MAKE_JUST_WORLDS= YES | MAKE_JUST_WORLDS= YES | ||||
.else | .else | ||||
UNIVERSE_TARGET?= buildworld | UNIVERSE_TARGET?= buildworld | ||||
.endif | .endif | ||||
KERNSRCDIR?= ${.CURDIR}/sys | KERNSRCDIR?= ${.CURDIR}/sys | ||||
# Directory for writing logs etc | |||||
UNIVERSE_LOGDIR?=${.CURDIR} | |||||
lidl: Please use a name other than the uber-generic "LOGDIR" for this.
In FreeBSD 9.x I was bitten… | |||||
Not Done Inline ActionsBased on a similar comment by grog@, I've changed to UNIVERSE_LOGDIR - which in extremely unlikely to clash. peterj: Based on a similar comment by grog@, I've changed to UNIVERSE_LOGDIR - which in extremely… | |||||
targets: .PHONY | targets: .PHONY | ||||
@echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" | @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" | ||||
.for target in ${TARGETS} | .for target in ${TARGETS} | ||||
.for target_arch in ${TARGET_ARCHES_${target}} | .for target_arch in ${TARGET_ARCHES_${target}} | ||||
@echo " ${target}/${target_arch}" | @echo " ${target}/${target_arch}" | ||||
.endfor | .endfor | ||||
.endfor | .endfor | ||||
.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 | ||||
.endif | .endif | ||||
universe_prologue: upgrade_checks | universe_prologue: upgrade_checks | ||||
universe: universe_prologue | universe: universe_prologue | ||||
universe_prologue: .PHONY | universe_prologue: .PHONY | ||||
Show All 16 Lines | |||||
.for target_arch in ${TARGET_ARCHES_${target}} | .for target_arch in ${TARGET_ARCHES_${target}} | ||||
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY | universe_${target}_worlds: universe_${target}_${target_arch} .PHONY | ||||
universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY | universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY | ||||
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" | @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" | ||||
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | ||||
${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ | ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ | ||||
TARGET=${target} \ | TARGET=${target} \ | ||||
TARGET_ARCH=${target_arch} \ | TARGET_ARCH=${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 | ||||
.endif # !MAKE_JUST_KERNELS | .endif # !MAKE_JUST_KERNELS | ||||
.if !defined(MAKE_JUST_WORLDS) | .if !defined(MAKE_JUST_WORLDS) | ||||
universe_${target}_done: universe_${target}_kernels .PHONY | universe_${target}_done: universe_${target}_kernels .PHONY | ||||
universe_${target}_kernels: universe_${target}_worlds .PHONY | universe_${target}_kernels: universe_${target}_worlds .PHONY | ||||
universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY | universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY | ||||
.if exists(${KERNSRCDIR}/${target}/conf/NOTES) | .if exists(${KERNSRCDIR}/${target}/conf/NOTES) | ||||
@(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ | @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ | ||||
${SUB_MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ | ${SUB_MAKE} LINT > ${UNIVERSE_LOGDIR}/_.${target}.makeLINT 2>&1 || \ | ||||
(echo "${target} 'make LINT' failed," \ | (echo "${target} 'make LINT' failed," \ | ||||
"check _.${target}.makeLINT for details"| ${MAKEFAIL})) | "check ${UNIVERSE_LOGDIR}/_.${target}.makeLINT for details"| ${MAKEFAIL})) | ||||
.endif | .endif | ||||
@cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ | @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ | ||||
universe_kernels | universe_kernels | ||||
.endif # !MAKE_JUST_WORLDS | .endif # !MAKE_JUST_WORLDS | ||||
# Tell the user the worlds and kernels have completed | # Tell the user the worlds and kernels have completed | ||||
universe_${target}: universe_${target}_done | universe_${target}: universe_${target}_done | ||||
universe_${target}_done: | universe_${target}_done: | ||||
Show All 23 Lines | |||||
.endif | .endif | ||||
universe_kernconfs: universe_kernconf_${TARGET}_${kernel} | universe_kernconfs: universe_kernconf_${TARGET}_${kernel} | ||||
universe_kernconf_${TARGET}_${kernel}: .MAKE | universe_kernconf_${TARGET}_${kernel}: .MAKE | ||||
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | ||||
${SUB_MAKE} ${JFLAG} buildkernel \ | ${SUB_MAKE} ${JFLAG} buildkernel \ | ||||
TARGET=${TARGET} \ | TARGET=${TARGET} \ | ||||
TARGET_ARCH=${TARGET_ARCH_${kernel}} \ | TARGET_ARCH=${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})) | ||||
.endfor | .endfor | ||||
universe: universe_epilogue | universe: universe_epilogue | ||||
universe_epilogue: .PHONY | universe_epilogue: .PHONY | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
@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 defined(DOING_TINDERBOX) | ||||
Show All 34 Lines |
Please use a name other than the uber-generic "LOGDIR" for this.
In FreeBSD 9.x I was bitten by a similar problem: The unadorned usage of "LOGFILE" in usr.sbin/etc/etcupdate.sh - the build logs for nightly builds where being truncated when this script was run.
Even more annoying the usage of the environmental variable isn't documented in the manpage for that command, while only "EDITOR"
is mentioned.
I'd suggest something like "ULOGDIR", which is far, far, less likely to conflict with an existing code.