2002-02-26 21:14:40 +03:00
|
|
|
# $NetBSD: Makefile,v 1.38 2002/02/26 18:15:59 tv Exp $
|
2002-01-29 13:20:28 +03:00
|
|
|
|
2002-02-01 01:43:33 +03:00
|
|
|
# XXX Note: NO_DBSYM is a stopgap temporary variable for use
|
|
|
|
# with the development of non-NetBSD hosting support. This will go away.
|
2001-08-14 15:01:55 +04:00
|
|
|
|
2001-09-22 08:15:19 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2002-01-01 01:35:41 +03:00
|
|
|
# XXX We can't currently build the toolchain for x86-64.
|
|
|
|
.if ${MACHINE_ARCH} != "x86_64"
|
2002-01-29 13:20:28 +03:00
|
|
|
TOOLCHAIN_BITS= toolchain .WAIT ${NO_DBSYM:D:Udbsym} mdsetimage
|
|
|
|
.endif
|
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
# Dependencies in SUBDIR below ordered to maximize parallel ability.
|
2001-11-02 08:07:22 +03:00
|
|
|
.if !defined(NOSUBDIR)
|
2002-01-10 20:04:20 +03:00
|
|
|
SUBDIR= host-mkdep .WAIT compat .WAIT \
|
2001-11-13 02:16:17 +03:00
|
|
|
binstall .WAIT \
|
2002-02-01 01:43:33 +03:00
|
|
|
cap_mkdb crunchgen ctags gencat lint lint2 lorder \
|
|
|
|
m4 makewhatis mkdep mtree rpcgen tsort uudecode \
|
|
|
|
texinfo .WAIT \
|
2001-11-13 02:16:17 +03:00
|
|
|
yacc .WAIT \
|
|
|
|
groff \
|
|
|
|
lex .WAIT \
|
2002-02-01 01:43:33 +03:00
|
|
|
${TOOLCHAIN_BITS} \
|
|
|
|
asn1_compile compile_et config lint1 \
|
|
|
|
makefs menuc mklocale msgc pax pwd_mkdb zic
|
2001-12-12 00:17:56 +03:00
|
|
|
|
|
|
|
.if ${MKMAINTAINERTOOLS:Uno} != "no"
|
2002-02-26 21:14:40 +03:00
|
|
|
SUBDIR+= autoconf gettext
|
2001-12-12 00:17:56 +03:00
|
|
|
.endif
|
2002-01-05 10:03:30 +03:00
|
|
|
|
|
|
|
.if ${MACHINE} == sparc || ${MACHINE} == sparc64
|
|
|
|
SUBDIR+= sparc-installboot
|
|
|
|
.endif
|
2002-02-24 00:32:27 +03:00
|
|
|
|
|
|
|
.if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb")
|
|
|
|
SUBDIR+= mips-elf2ecoff
|
|
|
|
.endif
|
|
|
|
|
2001-11-02 08:07:22 +03:00
|
|
|
.endif
|
2001-08-14 15:01:55 +04:00
|
|
|
|
2001-11-22 03:13:10 +03:00
|
|
|
.if ${MKTOOLS:Uyes} == "no" || ${USETOOLS} != "yes"
|
2001-11-13 19:17:24 +03:00
|
|
|
realall install: _warn
|
2001-11-22 22:09:42 +03:00
|
|
|
.if ${MKTOOLS:Uyes} == "no"
|
2001-11-13 19:17:24 +03:00
|
|
|
_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'
|
2001-12-29 18:45:52 +03:00
|
|
|
@echo '*** in version skew and build errors over time!'
|
2001-11-22 03:13:10 +03:00
|
|
|
.else
|
|
|
|
_warn:
|
|
|
|
.endif
|
2001-11-13 19:17:24 +03:00
|
|
|
|
|
|
|
.for dir in ${SUBDIR:N.WAIT}
|
|
|
|
all-${dir} depend-${dir} dependall-${dir} install-${dir}:
|
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2001-08-14 15:01:55 +04:00
|
|
|
.include <bsd.subdir.mk>
|
2001-10-31 04:20:09 +03:00
|
|
|
.include <bsd.obj.mk>
|
2001-10-31 20:46:08 +03:00
|
|
|
|
2002-02-18 18:35:53 +03:00
|
|
|
# For each .WAIT point, make sure the previous targets are installed before
|
2001-11-13 02:16:17 +03:00
|
|
|
# building a dependent target.
|
2002-02-18 18:35:53 +03:00
|
|
|
#
|
|
|
|
# We use the "internal" targets and dependencies generated by <bsd.subdir.mk>
|
|
|
|
# to achieve this. These targets look like:
|
|
|
|
# subdir-all: all-dir1 [.WAIT] all-dir2 etc..
|
|
|
|
# subdir-install: install-dir1 [.WAIT] install-dir2 etc..
|
|
|
|
# and so on for each element in ${TARGETS}, with .WAIT sources inserted at
|
|
|
|
# places corresponding to the .WAITs in our $SUBDIR variable.
|
|
|
|
#
|
|
|
|
# In this Makefile we want additional depencies of the `all-dirN',
|
|
|
|
# `depend-dirN' and `dependall-dirN' targets in the Nth ".WAIT group" on all
|
|
|
|
# of the `install-dir[N-1]' targets in the previous ".WAIT group".
|
|
|
|
#
|
|
|
|
# Also, since we're now mixing `install' with `all' and `depend' targets
|
|
|
|
# an order relationship between those in each individual subdirectory
|
|
|
|
# must be established.
|
|
|
|
#
|
2002-02-11 10:21:41 +03:00
|
|
|
_dep:=
|
2002-02-18 18:35:53 +03:00
|
|
|
_group:=
|
2001-11-13 02:16:17 +03:00
|
|
|
.for d in ${SUBDIR}
|
|
|
|
_this:= ${d}
|
|
|
|
.if ${_this} == ".WAIT"
|
2002-02-18 18:35:53 +03:00
|
|
|
|
|
|
|
# setup dependency to apply to all/depend targets in the next group
|
|
|
|
_dep:= ${_group:S/^/install-/}
|
|
|
|
_group:=
|
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.else
|
2002-02-18 18:35:53 +03:00
|
|
|
|
|
|
|
# build the current ".WAIT group"
|
|
|
|
_group:= ${_group} ${d}
|
|
|
|
# order depend/all/install targets for ${d} subdir. Note the additional
|
|
|
|
# .WAIT to achieve "closure" of the predecessor/successor relationships.
|
|
|
|
.ORDER: depend-${d} all-${d} dependall-${d} .WAIT install-${d}
|
|
|
|
# make all/depend-${d} dependent on all install targets in the previous group
|
2002-02-11 10:21:41 +03:00
|
|
|
depend-${d} all-${d} dependall-${d}: ${_dep}
|
2002-02-18 18:35:53 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2001-10-31 20:46:08 +03:00
|
|
|
cleantools:
|
|
|
|
rm -r -f tools.${HOST_OSTYPE}
|