Makefile revision 1.14
11.14Spk#	$NetBSD: Makefile,v 1.14 2002/02/19 12:13:10 pk Exp $
21.1Stv
31.1StvMODULE=		groff
41.1Stv
51.1StvALL_TARGET=	src/include all
61.11StvMAKE_ARGS=	bindir=${TOOLDIR}/lib/groff
71.6Sjmc
81.6SjmcTMACDIR=	${TOOLDIR}/share/groff/tmac
91.2Stv
101.2Stv# Add gnuwrap hack directly to the Makefile.
111.2Stv_NOWRAPPER=1
121.14Spk
131.14Spk#
141.14Spk# Fixup build/Makefile.
151.14Spk# XXX - the groff distribution Makefiles don't get their dependencies right.
161.14Spk#	We use internal knowledge to specify additional target ordering.
171.14Spk#	This can be removed once our own make(1) can be invoked in true
181.14Spk#	sequential (i.e. compatible) mode again for subdir makes.
191.14Spk#
201.14Spk.configure_done: _post_conf
211.14Spk_post_conf: .USE
221.14Spk	@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
231.14Spk	  echo '.ORDER: $$(ALLDIRS) dot';\
241.14Spk	  echo '.ORDER: all install' ) >> build/Makefile
251.14Spk
261.1Stv
271.1Stv.include "${.CURDIR}/../Makefile.gnuhost"
281.1Stv
291.1Stv.PATH:		${.CURDIR}/../../share/tmac
301.1Stv
311.9Stv_installtmac: .USE
321.1Stv.if defined(UPDATE)
331.9Stv	@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
341.9Stv		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
351.9Stv		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
361.1Stv	fi
371.1Stv.else
381.9Stv	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
391.1Stv.endif
401.9Stv
411.9Stv.for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html
421.9Stvafterinstall:	${TMACDIR}/tmac.${F}
431.9Stv.PHONY:		${TMACDIR}/tmac.${F}
441.9Stv${TMACDIR}/tmac.${F}: ${F} _installtmac
451.1Stv.endfor
461.1Stv
471.8Sjmcafterinstall: ${TMACDIR}/tmac.an.old
481.9Stv${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an _installtmac
491.8Sjmc
501.1Stvafterinstall: ${TMACDIR}/tmac.an
511.9Stv${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc _installtmac
521.4Stv
531.12Stv# The silly walk below is because sometimes the files begin with "g",
541.12Stv# and sometimes not, depending on what the host tool has at build time.
551.12Stv
561.12Stvafterinstall: install.grofflinks
571.12Stvinstall.grofflinks:
581.13Stv	@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
591.13Stv
601.4Stv.for F in eqn groff indxbib pic refer soelim tbl
611.13Stvinstall.grofflinks.recurse: ${TOOLDIR}/bin/nb${F}
621.12Stv.if exists(${TOOLDIR}/lib/groff/g${F})
631.12Stv${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/g${F}
641.12Stv.else
651.4Stv${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
661.12Stv.endif
671.4Stv	ln -f ${.ALLSRC} ${.TARGET}
681.4Stv.endfor
691.13Stv
70