aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-01-06 17:34:17 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-01-06 17:34:17 +0000
commit0b2b53a2ea57632fc3e5a21797a578d414a8ff9e (patch)
tree169ed2f062d01118bddc618e212b2db1a6d030f4 /Makefile
parent4ad24737902b18f825362d302a8f89814a3cd6f0 (diff)
downloadsrc-0b2b53a2ea57632fc3e5a21797a578d414a8ff9e.tar.gz
src-0b2b53a2ea57632fc3e5a21797a578d414a8ff9e.zip
Only build kernels for enabled TARGET_ARCHes in make universe/tinderbox.
Previously, all of the kernels for a given TARGET were built if that target was enabled. This was implemented by having each kernel built via a universe_kernconf_<KERNEL> target that was depended on by a universe_kernconfs target. However, this meant that if one did a build with a limited set of TARGET_ARCH values for a given TARGET, kernels could be built for which we hadn't built a world or toolchain. For example, 'make TARGETS=mips TARGET_ARCHES_mips=mips64' would build mips32 kernels. Fix this by adding an extra layer of indirection in the kernel make targets. universe_kernconf_<KERNEL> is now a dependency of a new universe_kernconfs_<TARGET_ARCH>. universe_kernconfs in turn depends on a list of universe_kernconfs_<target_arch> values, but only the values enabled in TARGET_ARCHES_<TARGET>. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D23031
Notes
Notes: svn path=/head/; revision=356418
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b8b0909339c9..eebd0e84d28f 100644
--- a/Makefile
+++ b/Makefile
@@ -724,7 +724,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
.if empty(TARGET_ARCH_${kernel})
.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old."
.endif
-universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
+universe_kernconfs_${TARGET_ARCH_${kernel}}: universe_kernconf_${TARGET}_${kernel}
universe_kernconf_${TARGET}_${kernel}: .MAKE
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
@@ -738,6 +738,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`"
.endfor
+.for target_arch in ${TARGET_ARCHES_${TARGET}}
+universe_kernconfs: universe_kernconfs_${target_arch} .PHONY
+.endfor
.endif # make(universe_kernels)
universe: universe_epilogue
universe_epilogue: .PHONY