Home | History | Annotate | Line # | Download | only in tools
Makefile revision 1.36
      1 #	$NetBSD: Makefile,v 1.36 2002/02/18 15:35:53 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"
     10 TOOLCHAIN_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)
     15 SUBDIR=	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"
     28 SUBDIR+=	autoconf
     29 .endif
     30 
     31 .if ${MACHINE} == sparc || ${MACHINE} == sparc64
     32 SUBDIR+=	sparc-installboot
     33 .endif
     34 .endif
     35 
     36 .if ${MKTOOLS:Uyes} == "no" || ${USETOOLS} != "yes"
     37 realall 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}
     49 all-${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 targets are installed before
     58 # building a dependent target.
     59 #
     60 # We use the "internal" targets and dependencies generated by <bsd.subdir.mk>
     61 # to achieve this. These targets look like:
     62 #	subdir-all:	all-dir1     [.WAIT] all-dir2     etc..
     63 #	subdir-install:	install-dir1 [.WAIT] install-dir2 etc..
     64 # and so on for each element in ${TARGETS}, with .WAIT sources inserted at
     65 # places corresponding to the .WAITs in our $SUBDIR variable.
     66 #
     67 # In this Makefile we want additional depencies of the `all-dirN',
     68 # `depend-dirN' and `dependall-dirN' targets in the Nth ".WAIT group" on all
     69 # of the `install-dir[N-1]' targets in the previous ".WAIT group".
     70 #
     71 # Also, since we're now mixing `install' with `all' and `depend' targets
     72 # an order relationship between those in each individual subdirectory
     73 # must be established.
     74 #
     75 _dep:=
     76 _group:=
     77 .for d in ${SUBDIR}
     78 _this:=		${d}
     79 .if ${_this} == ".WAIT"
     80 
     81 # setup dependency to apply to all/depend targets in the next group
     82 _dep:=		${_group:S/^/install-/}
     83 _group:=
     84 
     85 .else
     86 
     87 # build the current ".WAIT group"
     88 _group:=	${_group} ${d}
     89 # order depend/all/install targets for ${d} subdir.  Note the additional
     90 # .WAIT to achieve "closure" of the predecessor/successor relationships.
     91 .ORDER: depend-${d} all-${d} dependall-${d} .WAIT install-${d}
     92 # make all/depend-${d} dependent on all install targets in the previous group
     93 depend-${d} all-${d} dependall-${d}: ${_dep}
     94 
     95 .endif
     96 .endfor
     97 
     98 cleantools:
     99 	rm -r -f tools.${HOST_OSTYPE}
    100