Makefile revision 219137
12061Sjkh#
250479Speter# $FreeBSD: head/Makefile 219137 2011-03-01 14:54:14Z jhb $
32061Sjkh#
438666Sjb# The user-driven targets are:
532427Sjb#
6111131Sru# universe            - *Really* build *everything* (buildworld and
7111131Sru#                       all kernels on all architectures).
8217733Sbz# tinderbox           - Same as universe, but presents a list of failed build
9217733Sbz#                       targets and exits with an error if there were any.
1038666Sjb# buildworld          - Rebuild *everything*, including glue to help do
1138666Sjb#                       upgrades.
1238666Sjb# installworld        - Install everything built by "buildworld".
13159363Strhodes# world               - buildworld + installworld, no kernel.
1464049Salex# buildkernel         - Rebuild the kernel and the kernel-modules.
1564049Salex# installkernel       - Install the kernel and the kernel-modules.
16116679Ssimokawa# installkernel.debug
1766071Smarkm# reinstallkernel     - Reinstall the kernel and the kernel-modules.
18116679Ssimokawa# reinstallkernel.debug
1973504Sobrien# kernel              - buildkernel + installkernel.
20204661Simp# kernel-toolchain    - Builds the subset of world necessary to build a kernel
21158962Snetchild# doxygen             - Build API documentation of the kernel, needs doxygen.
2238666Sjb# update              - Convenient way to update your source tree (cvs).
23169597Sdes# check-old           - List obsolete directories/files/libraries.
24169597Sdes# check-old-dirs      - List obsolete directories.
25169597Sdes# check-old-files     - List obsolete files.
26169597Sdes# check-old-libs      - List obsolete libraries.
27169597Sdes# delete-old          - Delete obsolete directories/files/libraries.
28169597Sdes# delete-old-dirs     - Delete obsolete directories.
29169597Sdes# delete-old-files    - Delete obsolete files.
30169597Sdes# delete-old-libs     - Delete obsolete libraries.
31217815Sbz# targets             - Print a list of supported TARGET/TARGET_ARCH pairs
32217815Sbz#                       for world and kernel targets.
33218524Sjhb# toolchains          - Build a toolchain for all world and kernel targets.
3432427Sjb#
3538666Sjb# This makefile is simple by design. The FreeBSD make automatically reads
36108451Sschweikh# the /usr/share/mk/sys.mk unless the -m argument is specified on the
3738666Sjb# command line. By keeping this makefile simple, it doesn't matter too
3838666Sjb# much how different the installed mk files are from those in the source
3938666Sjb# tree. This makefile executes a child make process, forcing it to use
4038666Sjb# the mk files from the source tree which are supposed to DTRT.
4117308Speter#
42217273Simp# Most of the user-driven targets (as listed above) are implemented in
43217294Simp# Makefile.inc1.  The exceptions are universe, tinderbox and targets.
4419175Sbde#
4596205Sjwd# If you want to build your system from source be sure that /usr/obj has
46217297Simp# at least 1GB of diskspace available.  A complete 'universe' build requires
47217297Simp# about 15GB of space.
4838042Sbde#
4996205Sjwd# For individuals wanting to build from the sources currently on their
5096205Sjwd# system, the simple instructions are:
5138042Sbde#
5296205Sjwd# 1.  `cd /usr/src'  (or to the directory containing your source tree).
53159363Strhodes# 2.  Define `HISTORICAL_MAKE_WORLD' variable (see README).
54159363Strhodes# 3.  `make world'
5517308Speter#
5696205Sjwd# For individuals wanting to upgrade their sources (even if only a
5796205Sjwd# delta of a few days):
5817308Speter#
59148330Snetchild#  1.  `cd /usr/src'       (or to the directory containing your source tree).
60148330Snetchild#  2.  `make buildworld'
61148330Snetchild#  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE'     (default is GENERIC).
62148330Snetchild#  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
63159831Sobrien#       [steps 3. & 4. can be combined by using the "kernel" target]
64148330Snetchild#  5.  `reboot'        (in single user mode: boot -s from the loader prompt).
65148330Snetchild#  6.  `mergemaster -p'
66148330Snetchild#  7.  `make installworld'
67148330Snetchild#  8.  `make delete-old'
68178653Srwatson#  9.  `mergemaster'                         (you may wish to use -U or -ai).
69148330Snetchild# 10.  `reboot'
70148330Snetchild# 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)
7196205Sjwd#
7296205Sjwd# See src/UPDATING `COMMON ITEMS' for more complete information.
7396205Sjwd#
74162147Sru# If TARGET=machine (e.g. ia64, sparc64, ...) is specified you can
75162147Sru# cross build world for other machine types using the buildworld target,
7698723Sdillon# and once the world is built you can cross build a kernel using the
7798723Sdillon# buildkernel target.
7898723Sdillon#
7938666Sjb# Define the user-driven targets. These are listed here in alphabetical
8038666Sjb# order, but that's not important.
8117308Speter#
82123311Speter# Targets that begin with underscore are internal targets intended for
83123311Speter# developer convenience only.  They are intentionally not documented and
84123311Speter# completely subject to change without notice.
85123311Speter#
86175833Sjhb# For more information, see the build(7) manual page.
87175833Sjhb#
88169597SdesTGTS=	all all-man buildenv buildenvvars buildkernel buildworld \
89169597Sdes	check-old check-old-dirs check-old-files check-old-libs \
90169597Sdes	checkdpadd clean cleandepend cleandir \
91169597Sdes	delete-old delete-old-dirs delete-old-files delete-old-libs \
92159349Simp	depend distribute distributeworld distrib-dirs distribution doxygen \
93158962Snetchild	everything hierarchy install installcheck installkernel \
94158962Snetchild	installkernel.debug reinstallkernel reinstallkernel.debug \
95158962Snetchild	installworld kernel-toolchain libraries lint maninstall \
96156840Sru	obj objlink regress rerelease showconfig tags toolchain update \
97123311Speter	_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
98137288Speter	_build-tools _cross-tools _includes _libraries _depend \
99209128Sraj	build32 builddtb distribute32 install32 xdev xdev-build xdev-install \
100209128Sraj
101156740SruTGTS+=	${SUBDIR_TARGETS}
1022061Sjkh
10397769SruBITGTS=	files includes
10497252SruBITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
105119579SruTGTS+=	${BITGTS}
10697252Sru
10795730Sru.ORDER: buildworld installworld
10895793Sru.ORDER: buildworld distributeworld
109111617Sru.ORDER: buildworld buildkernel
11095730Sru.ORDER: buildkernel installkernel
111116679Ssimokawa.ORDER: buildkernel installkernel.debug
11295730Sru.ORDER: buildkernel reinstallkernel
113116679Ssimokawa.ORDER: buildkernel reinstallkernel.debug
11495730Sru
115110035SruPATH=	/sbin:/bin:/usr/sbin:/usr/bin
116107516SruMAKEOBJDIRPREFIX?=	/usr/obj
117138921Sru_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
118156145Syar    ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
119138921Sru    -f /dev/null -V MAKEOBJDIRPREFIX dummy
120133942Sru.if !empty(_MAKEOBJDIRPREFIX)
121133942Sru.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
122156145Syar	(in make.conf(5)) or command-line variable.
123133942Sru.endif
124110035SruMAKEPATH=	${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
125117234SruBINMAKE= \
126110035Sru	`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
127117229Sru	-m ${.CURDIR}/share/mk
128218206Simp_MAKE=	PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH}
12954324Smarcel
130218130Simp# Guess machine architecture from machine type, and vice versa.
131218130Simp.if !defined(TARGET_ARCH) && defined(TARGET)
132218130Simp_TARGET_ARCH=	${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
133218130Simp.elif !defined(TARGET) && defined(TARGET_ARCH) && \
134218130Simp    ${TARGET_ARCH} != ${MACHINE_ARCH}
135218130Simp_TARGET=		${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
136218130Simp.endif
137218130Simp# Legacy names, for a transition period mips:mips -> mipsel:mips
138218130Simp.if defined(TARGET) && defined(TARGET_ARCH) && \
139218130Simp    ${TARGET_ARCH} == "mips" && ${TARGET} == "mips"
140218130Simp.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb"
141218130Simp.if defined(TARGET_BIG_ENDIAN)
142218130Simp_TARGET_ARCH=mipseb
143218130Simp.else
144218130Simp_TARGET_ARCH=mipsel
145218130Simp.endif
146218130Simp.endif
147218130Simp# arm with TARGET_BIG_ENDIAN -> armeb
148218130Simp.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)
149218130Simp.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use armeb"
150218130Simp_TARGET_ARCH=armeb
151218130Simp.endif
152218130Simp.if defined(TARGET) && !defined(_TARGET)
153218130Simp_TARGET=${TARGET}
154218130Simp.endif
155218130Simp.if defined(TARGET_ARCH) && !defined(_TARGET_ARCH)
156218130Simp_TARGET_ARCH=${TARGET_ARCH}
157218130Simp.endif
158218130Simp# Otherwise, default to current machine type and architecture.
159218130Simp_TARGET?=	${MACHINE}
160218130Simp_TARGET_ARCH?=	${MACHINE_ARCH}
161218130Simp
16217308Speter#
163119519Smarcel# Make sure we have an up-to-date make(1). Only world and buildworld
164119519Smarcel# should do this as those are the initial targets used for upgrades.
165119519Smarcel# The user can define ALWAYS_CHECK_MAKE to have this check performed
166119519Smarcel# for all targets.
167119519Smarcel#
168119519Smarcel.if defined(ALWAYS_CHECK_MAKE)
169119579Sru${TGTS}: upgrade_checks
170119519Smarcel.else
171119519Smarcelbuildworld: upgrade_checks
172119519Smarcel.endif
173119519Smarcel
174119519Smarcel#
175126031Sgad# This 'cleanworld' target is not included in TGTS, because it is not a
176126024Sgad# recursive target.  All of the work for it is done right here.   It is
177126024Sgad# expected that BW_CANONICALOBJDIR == the CANONICALOBJDIR as would be
178126024Sgad# created by bsd.obj.mk, except that we don't want to .include that file
179126024Sgad# in this makefile.  
180126024Sgad#
181126024Sgad# In the following, the first 'rm' in a series will usually remove all
182126024Sgad# files and directories.  If it does not, then there are probably some
183126024Sgad# files with chflags set, so this unsets them and tries the 'rm' a
184126024Sgad# second time.  There are situations where this target will be cleaning
185126024Sgad# some directories via more than one method, but that duplication is
186126024Sgad# needed to correctly handle all the possible situations.
187126024Sgad#
188126024SgadBW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
189126031Sgadcleanworld:
190126024Sgad.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
191126024Sgad.if exists(${BW_CANONICALOBJDIR}/)
192126024Sgad	-rm -rf ${BW_CANONICALOBJDIR}/*
193172744Sdelphij	-chflags -R 0 ${BW_CANONICALOBJDIR}
194126024Sgad	rm -rf ${BW_CANONICALOBJDIR}/*
195126024Sgad.endif
196126024Sgad	#   To be safe in this case, fall back to a 'make cleandir'
197133376Sharti	${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
198126024Sgad.else
199126024Sgad	-rm -rf ${.OBJDIR}/*
200172744Sdelphij	-chflags -R 0 ${.OBJDIR}
201126024Sgad	rm -rf ${.OBJDIR}/*
202126024Sgad.endif
203125885Sgad
204125885Sgad#
20538666Sjb# Handle the user-driven targets, using the source relative mk files.
20617308Speter#
207119519Smarcel
208119579Sru${TGTS}:
209218206Simp	${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
2102302Spaul
21139206Sjkh# Set a reasonable default
21239206Sjkh.MAIN:	all
21339206Sjkh
214133945SruSTARTTIME!= LC_ALL=C date
215177609SruCHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0
216177609Sru.if !empty(CHECK_TIME)
217177609Sru.error check your date/time: ${STARTTIME}
218177609Sru.endif
219133945Sru
220132358Smarkm.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
22117308Speter#
22254324Smarcel# world
22354324Smarcel#
224132234Smarcel# Attempt to rebuild and reinstall everything. This target is not to be
225132234Smarcel# used for upgrading an existing FreeBSD system, because the kernel is
226132234Smarcel# not included. One can argue that this target doesn't build everything
227132234Smarcel# then.
22854324Smarcel#
22954324Smarcelworld: upgrade_checks
23054324Smarcel	@echo "--------------------------------------------------------------"
231118531Sru	@echo ">>> make world started on ${STARTTIME}"
23254324Smarcel	@echo "--------------------------------------------------------------"
23354324Smarcel.if target(pre-world)
23454324Smarcel	@echo
23554324Smarcel	@echo "--------------------------------------------------------------"
23654324Smarcel	@echo ">>> Making 'pre-world' target"
23754324Smarcel	@echo "--------------------------------------------------------------"
238133376Sharti	${_+_}@cd ${.CURDIR}; ${_MAKE} pre-world
23954324Smarcel.endif
240133376Sharti	${_+_}@cd ${.CURDIR}; ${_MAKE} buildworld
241133376Sharti	${_+_}@cd ${.CURDIR}; ${_MAKE} -B installworld
24254324Smarcel.if target(post-world)
24354324Smarcel	@echo
24454324Smarcel	@echo "--------------------------------------------------------------"
24554324Smarcel	@echo ">>> Making 'post-world' target"
24654324Smarcel	@echo "--------------------------------------------------------------"
247133376Sharti	${_+_}@cd ${.CURDIR}; ${_MAKE} post-world
24854324Smarcel.endif
24954324Smarcel	@echo
25054324Smarcel	@echo "--------------------------------------------------------------"
251118531Sru	@echo ">>> make world completed on `LC_ALL=C date`"
252118531Sru	@echo "                   (started ${STARTTIME})"
25354324Smarcel	@echo "--------------------------------------------------------------"
254132234Smarcel.else
255132234Smarcelworld:
256132234Smarcel	@echo "WARNING: make world will overwrite your existing FreeBSD"
257132234Smarcel	@echo "installation without also building and installing a new"
258132234Smarcel	@echo "kernel.  This can be dangerous.  Please read the handbook,"
259132588Skensmith	@echo "'Rebuilding world', for how to upgrade your system."
260132358Smarkm	@echo "Define DESTDIR to where you want to install FreeBSD,"
261132234Smarcel	@echo "including /, to override this warning and proceed as usual."
262132358Smarkm	@echo ""
263132234Smarcel	@echo "Bailing out now..."
264132234Smarcel	@false
265132234Smarcel.endif
26654324Smarcel
26754324Smarcel#
26895730Sru# kernel
26995730Sru#
27095730Sru# Short hand for `make buildkernel installkernel'
27195730Sru#
27295730Srukernel: buildkernel installkernel
27395730Sru
27495730Sru#
27538666Sjb# Perform a few tests to determine if the installed tools are adequate
276107374Sru# for building the world.
27717308Speter#
27855678Smarcelupgrade_checks:
279143032Sharti	@if ! (cd ${.CURDIR}/tools/build/make_check && \
280138515Sharti	    PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \
281117793Sru	    PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \
282110035Sru	then \
283174564Simp	    (cd ${.CURDIR} && ${MAKE} make); \
284110035Sru	fi
2852061Sjkh
28617308Speter#
287107516Sru# Upgrade make(1) to the current version using the installed
288174539Simp# headers, libraries and tools.  Also, allow the location of
289174539Simp# the system bsdmake-like utility to be overridden.
29055678Smarcel#
291107516SruMMAKEENV=	MAKEOBJDIRPREFIX=${MAKEPATH} \
292107516Sru		DESTDIR= \
293107516Sru		INSTALL="sh ${.CURDIR}/tools/install.sh"
294174564SimpMMAKE=		${MMAKEENV} ${MAKE} \
295107516Sru		-D_UPGRADING \
296139112Sru		-DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \
297164470Sjb		-DNO_CPU_CFLAGS -DNO_WERROR
298107516Sru
299122204Skrismake: .PHONY
30055678Smarcel	@echo
30155678Smarcel	@echo "--------------------------------------------------------------"
302116696Sru	@echo ">>> Building an up-to-date make(1)"
30355678Smarcel	@echo "--------------------------------------------------------------"
304133376Sharti	${_+_}@cd ${.CURDIR}/usr.bin/make; \
305107516Sru		${MMAKE} obj && \
306107516Sru		${MMAKE} depend && \
307107516Sru		${MMAKE} all && \
308107516Sru		${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
30955678Smarcel
310185499Salfredtinderbox:
311218524Sjhb	@cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe
312185499Salfred
313218524Sjhbtoolchains:
314218524Sjhb	@cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe
315218524Sjhb
31655678Smarcel#
317111131Sru# universe
318111131Sru#
319111131Sru# Attempt to rebuild *everything* for all supported architectures,
320133945Sru# with a reasonable chance of success, regardless of how old your
321111131Sru# existing system is.
322111131Sru#
323217125Simp.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
324216520SnwhitehornTARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
325216520SnwhitehornTARGET_ARCHES_arm?=	arm armeb
326217123SimpTARGET_ARCHES_mips?=	mipsel mipseb mips64el mips64eb
327216520SnwhitehornTARGET_ARCHES_powerpc?=	powerpc powerpc64
328216520SnwhitehornTARGET_ARCHES_pc98?=	i386
329216520SnwhitehornTARGET_ARCHES_sun4v?=	sparc64
330216520Snwhitehorn.for target in ${TARGETS}
331216520SnwhitehornTARGET_ARCHES_${target}?= ${target}
332216520Snwhitehorn.endfor
333168280Smarcel
334218524Sjhb.if defined(UNIVERSE_TARGET)
335218524SjhbMAKE_JUST_WORLDS=	YES
336218524Sjhb.else
337218524SjhbUNIVERSE_TARGET?=	buildworld
338218524Sjhb.endif
339219137SjhbKERNSRCDIR?=		${.CURDIR}/sys
340218524Sjhb
341217125Simptargets:
342217815Sbz	@echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets"
343217125Simp.for target in ${TARGETS}
344217125Simp.for target_arch in ${TARGET_ARCHES_${target}}
345217125Simp	@echo "    ${target}/${target_arch}"
346217125Simp.endfor
347217125Simp.endfor
348217125Simp
349185499Salfred.if defined(DOING_TINDERBOX)
350217735SbzFAILFILE=${.CURDIR}/_.tinderbox.failed
351185499SalfredMAKEFAIL=tee -a ${FAILFILE}
352185499Salfred.else
353185499SalfredMAKEFAIL=cat
354185499Salfred.endif
355185499Salfred
356133945Sruuniverse: universe_prologue
357133945Sruuniverse_prologue:
358103985Sphk	@echo "--------------------------------------------------------------"
359103985Sphk	@echo ">>> make universe started on ${STARTTIME}"
360103985Sphk	@echo "--------------------------------------------------------------"
361185499Salfred.if defined(DOING_TINDERBOX)
362217754Sbz	@rm -f ${FAILFILE}
363185499Salfred.endif
364168280Smarcel.for target in ${TARGETS}
365162147Sruuniverse: universe_${target}
366162147Sru.ORDER: universe_prologue universe_${target} universe_epilogue
367216520Snwhitehornuniverse_${target}: universe_${target}_prologue
368216520Snwhitehornuniverse_${target}_prologue:
369216520Snwhitehorn	@echo ">> ${target} started on `LC_ALL=C date`"
370179232Sjb.if !defined(MAKE_JUST_KERNELS)
371216520Snwhitehorn.for target_arch in ${TARGET_ARCHES_${target}}
372216520Snwhitehornuniverse_${target}: universe_${target}_${target_arch}
373216520Snwhitehornuniverse_${target}_${target_arch}: universe_${target}_prologue
374218524Sjhb	@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`"
375185250Sdes	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
376218524Sjhb	    ${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
377162147Sru	    TARGET=${target} \
378216520Snwhitehorn	    TARGET_ARCH=${target_arch} \
379218524Sjhb	    > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
380218524Sjhb	    (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
381218524Sjhb	    "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
382216520Snwhitehorn	    ${MAKEFAIL}))
383218524Sjhb	@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
384216520Snwhitehorn.endfor
385179232Sjb.endif
386205290Sdougb.if !defined(MAKE_JUST_WORLDS)
387219137Sjhb.if exists(${KERNSRCDIR}/${target}/conf/NOTES)
388219137Sjhb	@(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
389185250Sdes	    ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
390185499Salfred	    (echo "${target} 'make LINT' failed," \
391185499Salfred	    "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
392103985Sphk.endif
393201815Sbz	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
394201815Sbz	    universe_kernels
395205290Sdougb.endif
396201815Sbz	@echo ">> ${target} completed on `LC_ALL=C date`"
397201815Sbz.endfor
398201815Sbzuniverse_kernels: universe_kernconfs
399202095Sbz.if !defined(TARGET)
400202095SbzTARGET!=	uname -m
401202095Sbz.endif
402219137SjhbKERNCONFS!=	cd ${KERNSRCDIR}/${TARGET}/conf && \
403201815Sbz		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
404201815Sbz		! -name DEFAULTS ! -name NOTES
405201815Sbzuniverse_kernconfs:
406148154Sru.for kernel in ${KERNCONFS}
407219137SjhbTARGET_ARCH_${kernel}!=	cd ${KERNSRCDIR}/${TARGET}/conf && \
408219137Sjhb	config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
409216934Simp	grep -v WARNING: | cut -f 2
410216934Simp.if empty(TARGET_ARCH_${kernel})
411216934Simp.error "Target architecture for ${TARGET}/conf/${kernel} unknown.  config(8) likely too old."
412216934Simp.endif
413216520Snwhitehornuniverse_kernconfs: universe_kernconf_${TARGET}_${kernel}
414216520Snwhitehornuniverse_kernconf_${TARGET}_${kernel}:
415185250Sdes	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
416185250Sdes	    ${MAKE} ${JFLAG} buildkernel \
417201815Sbz	    TARGET=${TARGET} \
418216520Snwhitehorn	    TARGET_ARCH=${TARGET_ARCH_${kernel}} \
419148154Sru	    KERNCONF=${kernel} \
420201815Sbz	    > _.${TARGET}.${kernel} 2>&1 || \
421201815Sbz	    (echo "${TARGET} ${kernel} kernel failed," \
422201815Sbz	    "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
423148154Sru.endfor
424133945Sruuniverse: universe_epilogue
425133945Sruuniverse_epilogue:
426103985Sphk	@echo "--------------------------------------------------------------"
427118531Sru	@echo ">>> make universe completed on `LC_ALL=C date`"
428118531Sru	@echo "                      (started ${STARTTIME})"
429103985Sphk	@echo "--------------------------------------------------------------"
430185499Salfred.if defined(DOING_TINDERBOX)
431185499Salfred	@if [ -e ${FAILFILE} ] ; then \
432185499Salfred		echo "Tinderbox failed:" ;\
433185499Salfred		cat ${FAILFILE} ;\
434185499Salfred		exit 1 ;\
435185499Salfred	fi
436133945Sru.endif
437185499Salfred.endif
438