! ! In sys//conf/Makefile set TARGET to . That allows ! sys/conf/makeLINT.mk to only do certain things for certain ! architectures. ! ! Generate a second LINT configuration for i386 and amd64 in ! sys/conf/makeLINT.mk, which includes LINT and sets options VIMAGE ! so that we will have VIMAGE LINT builds[1]. Only do it for those ! two architectures to avoid massiv universe times for archs, where ! peopel will less likely use VIMAGE or not at all. ! ! To avoid hardcoding further kernel configuration names for ! make universe, split the logic into two parts: ! - 1st to build worlds and generate kernel configs like LINT. ! - 2nd to build kernels for a given TARGET architecture correctly ! finding all newly generated configs, not knowing anything about ! LINT anymore. (*) ! ! (*) If you know better/cleaner/... ways to do this, let me know. ! ! Annotation: this also allows one to add more such kernel configs ! like LINT-NOINET, LINT-NOINET6, .. that I have had for ages now ! to generate and maintain in a single place. ! ! ! Requested by: jhb [1] ! Discussed with: jhb, rwatson [1] ! Reviewed by: ! MFC After: ! Index: Makefile =================================================================== --- Makefile (revision 200541) +++ Makefile (working copy) @@ -278,7 +278,7 @@ tinderbox: # with a reasonable chance of success, regardless of how old your # existing system is. # -.if make(universe) || make(tinderbox) +.if make(universe) || make(tinderbox) || make(universe_kernels) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v .if defined(DOING_TINDERBOX) @@ -297,10 +297,6 @@ universe_prologue: rm -f ${FAILFILE} .endif .for target in ${TARGETS} -KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ - find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ - ! -name DEFAULTS ! -name LINT -KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: @@ -320,17 +316,22 @@ universe_${target}: (echo "${target} 'make LINT' failed," \ "check _.${target}.makeLINT for details"| ${MAKEFAIL})) .endif + cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} universe_kernels + @echo ">> ${target} completed on `LC_ALL=C date`" +.endfor +universe_kernels: universe_kernconfs +TARGET?= ${BUILD_ARCH} +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ + ! -name DEFAULTS ! -name NOTES +universe_kernconfs: .for kernel in ${KERNCONFS} @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildkernel \ - TARGET=${target} \ - KERNCONF=${kernel} \ - > _.${target}.${kernel} 2>&1 || \ - (echo "${target} ${kernel} kernel failed," \ - "check _.${target}.${kernel} for details"| ${MAKEFAIL})) + ${MAKE} ${JFLAG} buildkernel TARGET=${TARGET} KERNCONF=${kernel} \ + > _.${TARGET}.${kernel} 2>&1 || \ + (echo "${TARGET} ${kernel} kernel failed," \ + "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) .endfor - @echo ">> ${target} completed on `LC_ALL=C date`" -.endfor universe: universe_epilogue universe_epilogue: @echo "--------------------------------------------------------------" Index: sys/powerpc/conf/Makefile =================================================================== --- sys/powerpc/conf/Makefile (revision 200541) +++ sys/powerpc/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=powerpc + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/sparc64/conf/Makefile =================================================================== --- sys/sparc64/conf/Makefile (revision 200541) +++ sys/sparc64/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=sparc64 + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/conf/makeLINT.mk =================================================================== --- sys/conf/makeLINT.mk (revision 200541) +++ sys/conf/makeLINT.mk (working copy) @@ -5,7 +5,15 @@ all: clean: rm -f LINT +.if ${TARGET} == "amd64" || ${TARGET} == "i386" + rm -f LINT-VIMAGE +.endif NOTES= ../../conf/NOTES NOTES LINT: ${NOTES} ../../conf/makeLINT.sed cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +.if ${TARGET} == "amd64" || ${TARGET} == "i386" + echo "include ${.TARGET}" > ${.TARGET}-VIMAGE + echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE + echo "options VIMAGE" >> ${.TARGET}-VIMAGE +.endif Index: sys/ia64/conf/Makefile =================================================================== --- sys/ia64/conf/Makefile (revision 200541) +++ sys/ia64/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=ia64 + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/sun4v/conf/Makefile =================================================================== --- sys/sun4v/conf/Makefile (revision 200541) +++ sys/sun4v/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=sun4v + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/pc98/conf/Makefile =================================================================== --- sys/pc98/conf/Makefile (revision 200541) +++ sys/pc98/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=pc98 + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/i386/conf/Makefile =================================================================== --- sys/i386/conf/Makefile (revision 200541) +++ sys/i386/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=i386 + .include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/amd64/conf/Makefile =================================================================== --- sys/amd64/conf/Makefile (revision 200541) +++ sys/amd64/conf/Makefile (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=amd64 + .include "${.CURDIR}/../../conf/makeLINT.mk"