summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2011-02-10 18:54:52 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2011-02-10 18:54:52 +0000
commit4e889921ef42b4d2df74acdd4baab1bb9733a110 (patch)
tree703227412d003c141cc4d68a317cf4ac6f906bb7 /Makefile
parent2bb3ab3f9a08bbba9ece1b479e9570003fac9420 (diff)
downloadsrc-test2-4e889921ef42b4d2df74acdd4baab1bb9733a110.tar.gz
src-test2-4e889921ef42b4d2df74acdd4baab1bb9733a110.zip
- Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set,
then that target is invoked for each architecture rather than the default action of building world and kernels for each architecture. - Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build toolchains for all architectures. - Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for 'make universe'. Reviewed by: bz MFC after: 1 week
Notes
Notes: svn path=/head/; revision=218524
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e942f8a03d4d..005b1a85b92f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
# delete-old-libs - Delete obsolete libraries.
# targets - Print a list of supported TARGET/TARGET_ARCH pairs
# for world and kernel targets.
+# toolchains - Build a toolchain for all world and kernel targets.
#
# This makefile is simple by design. The FreeBSD make automatically reads
# the /usr/share/mk/sys.mk unless the -m argument is specified on the
@@ -307,8 +308,10 @@ make: .PHONY
${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
tinderbox:
- @cd ${.CURDIR} && \
- DOING_TINDERBOX=YES ${MAKE} JFLAG=${JFLAG} universe
+ @cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe
+
+toolchains:
+ @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe
#
# universe
@@ -328,6 +331,12 @@ TARGET_ARCHES_sun4v?= sparc64
TARGET_ARCHES_${target}?= ${target}
.endfor
+.if defined(UNIVERSE_TARGET)
+MAKE_JUST_WORLDS= YES
+.else
+UNIVERSE_TARGET?= buildworld
+.endif
+
targets:
@echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets"
.for target in ${TARGETS}
@@ -361,16 +370,16 @@ universe_${target}_prologue:
.for target_arch in ${TARGET_ARCHES_${target}}
universe_${target}: universe_${target}_${target_arch}
universe_${target}_${target_arch}: universe_${target}_prologue
- @echo ">> ${target}.${target_arch} buildworld 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 \
- ${MAKE} ${JFLAG} buildworld \
+ ${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
TARGET=${target} \
TARGET_ARCH=${target_arch} \
- > _.${target}.${target_arch}.buildworld 2>&1 || \
- (echo "${target}.${target_arch} world failed," \
- "check _.${target}.${target_arch}.buildworld for details" | \
+ > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
+ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
+ "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
${MAKEFAIL}))
- @echo ">> ${target}.${target_arch} buildworld completed on `LC_ALL=C date`"
+ @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
.endfor
.endif
.if !defined(MAKE_JUST_WORLDS)