Makefile revision 1.29
1#	$NetBSD: Makefile,v 1.29 2002/01/10 17:04:20 tv Exp $
2
3.include <bsd.own.mk>
4
5# XXX We can't currently build the toolchain for x86-64.
6.if ${MACHINE_ARCH} != "x86_64"
7TOOLCHAIN_BITS= toolchain .WAIT dbsym mdsetimage
8.endif
9
10# Dependencies in SUBDIR below ordered to maximize parallel ability.
11.if !defined(NOSUBDIR)
12SUBDIR=	host-mkdep .WAIT compat .WAIT \
13	binstall .WAIT \
14		crunchgen gencat lint lint2 lorder mkdep mtree rpcgen \
15		texinfo tsort makewhatis \
16	${TOOLCHAIN_BITS} \
17	yacc .WAIT \
18		groff \
19	lex .WAIT \
20		asn1_compile compile_et config lint1 msgc menuc makefs \
21		mklocale pwd_mkdb zic
22
23.if ${MKMAINTAINERTOOLS:Uno} != "no"
24SUBDIR+=	m4 .WAIT autoconf
25.endif
26
27.if ${MACHINE} == sparc || ${MACHINE} == sparc64
28SUBDIR+=	sparc-installboot
29.endif
30.endif
31
32.if ${MKTOOLS:Uyes} == "no" || ${USETOOLS} != "yes"
33realall install: _warn
34.if ${MKTOOLS:Uyes} == "no"
35_warn:
36	@echo '*** WARNING: "MKTOOLS" is set to "no"; this will prevent building and'
37	@echo '*** updating your host toolchain.  This should be used only as a'
38	@echo '*** temporary workaround for toolchain problems, as it will result'
39	@echo '*** in version skew and build errors over time!'
40.else
41_warn:
42.endif
43
44.for dir in ${SUBDIR:N.WAIT}
45all-${dir} depend-${dir} dependall-${dir} install-${dir}:
46	@true
47.endfor
48.endif
49
50.include <bsd.subdir.mk>
51.include <bsd.obj.mk>
52
53# For each .WAIT point, make sure the previous target is installed before
54# building a dependent target.
55_dep:=
56_last:=
57.for d in ${SUBDIR}
58_this:=		${d}
59.if ${_this} == ".WAIT"
60_dep:=		${_dep} install-${_last}
61.else
62_last:=		${d}
63depend-${d} all-${d} dependall-${d}: ${_dep}
64.endif
65.endfor
66
67cleantools:
68	rm -r -f tools.${HOST_OSTYPE}
69