NetBSD/tools/Makefile
pk e678b7f1d0 Use .ORDER targets to express the dependencies on subdir runs. This makes
the resulting tree complexity O(N) (N=# of subdirs), and it also makes it
easier to comprehend the Makefile logic.
2002-02-10 15:46:42 +00:00

72 lines
1.9 KiB
Makefile

# $NetBSD: Makefile,v 1.34 2002/02/10 15:46:42 pk Exp $
# XXX Note: NO_DBSYM is a stopgap temporary variable for use
# with the development of non-NetBSD hosting support. This will go away.
.include <bsd.own.mk>
# XXX We can't currently build the toolchain for x86-64.
.if ${MACHINE_ARCH} != "x86_64"
TOOLCHAIN_BITS= toolchain .WAIT ${NO_DBSYM:D:Udbsym} mdsetimage
.endif
# Dependencies in SUBDIR below ordered to maximize parallel ability.
.if !defined(NOSUBDIR)
SUBDIR= host-mkdep .WAIT compat .WAIT \
binstall .WAIT \
cap_mkdb crunchgen ctags gencat lint lint2 lorder \
m4 makewhatis mkdep mtree rpcgen tsort uudecode \
texinfo .WAIT \
yacc .WAIT \
groff \
lex .WAIT \
${TOOLCHAIN_BITS} \
asn1_compile compile_et config lint1 \
makefs menuc mklocale msgc pax pwd_mkdb zic
.if ${MKMAINTAINERTOOLS:Uno} != "no"
SUBDIR+= autoconf
.endif
.if ${MACHINE} == sparc || ${MACHINE} == sparc64
SUBDIR+= sparc-installboot
.endif
.endif
.if ${MKTOOLS:Uyes} == "no" || ${USETOOLS} != "yes"
realall install: _warn
.if ${MKTOOLS:Uyes} == "no"
_warn:
@echo '*** WARNING: "MKTOOLS" is set to "no"; this will prevent building and'
@echo '*** updating your host toolchain. This should be used only as a'
@echo '*** temporary workaround for toolchain problems, as it will result'
@echo '*** in version skew and build errors over time!'
.else
_warn:
.endif
.for dir in ${SUBDIR:N.WAIT}
all-${dir} depend-${dir} dependall-${dir} install-${dir}:
@true
.endfor
.endif
.include <bsd.subdir.mk>
.include <bsd.obj.mk>
# For each .WAIT point, make sure the previous target is installed before
# building a dependent target.
_last:=
.for d in ${SUBDIR}
_this:= ${d}
.if ${_this} == ".WAIT"
.ORDER: depend-${_last} all-${_last} dependall-${_last} install-${_last}
.else
.ORDER: depend-${d} all-${d} dependall-${d} install-${_last}
_last:= ${d}
.endif
.endfor
cleantools:
rm -r -f tools.${HOST_OSTYPE}