summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-03-27 17:22:08 +0000
committerbz <bz@FreeBSD.org>2010-03-27 17:22:08 +0000
commit804673555ef0d73a89e1bf87b2daa9ad16e0c97e (patch)
tree83219775e28b9b2299032b0a947f6fe68c03d1b1 /Makefile
parent6b0472356d6c04ad4157bc671cce6f214a5af1c5 (diff)
downloadFreeBSD-src-804673555ef0d73a89e1bf87b2daa9ad16e0c97e.zip
FreeBSD-src-804673555ef0d73a89e1bf87b2daa9ad16e0c97e.tar.gz
MFC r201815:
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. MFC rr201960: Use uname -m [1] and rename BUILD_ARCH to XMACHINE[2]. Submitted by: nyan[1], imp[2] MFC r202095: Rather than using an extra variable, only call uname if really needed and then directly assign the result. Submitted by: jmallett
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 17 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ebaeb6d..bd26716 100644
--- a/Makefile
+++ b/Makefile
@@ -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(universe_kernels) || make(tinderbox)
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,16 +316,26 @@ 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
+.if !defined(TARGET)
+TARGET!= uname -m
+.endif
+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} \
+ 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`"
+ > _.${TARGET}.${kernel} 2>&1 || \
+ (echo "${TARGET} ${kernel} kernel failed," \
+ "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
.endfor
universe: universe_epilogue
universe_epilogue:
OpenPOWER on IntegriCloud