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