Makefile revision 1.12
11.12Stv#	$NetBSD: Makefile,v 1.12 2002/01/31 22:43:51 tv 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.2Stv.build_done: build/Makefile
131.2Stvbuild/Makefile: .configure_done
141.2Stv	@printf '.include "${.CURDIR}/../Makefile.gnuwrap"\n' >>$@
151.1Stv
161.1Stv.include "${.CURDIR}/../Makefile.gnuhost"
171.1Stv
181.1Stv.PATH:		${.CURDIR}/../../share/tmac
191.1Stv
201.9Stv_installtmac: .USE
211.1Stv.if defined(UPDATE)
221.9Stv	@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
231.9Stv		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
241.9Stv		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
251.1Stv	fi
261.1Stv.else
271.9Stv	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
281.1Stv.endif
291.9Stv
301.9Stv.for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html
311.9Stvafterinstall:	${TMACDIR}/tmac.${F}
321.9Stv.PHONY:		${TMACDIR}/tmac.${F}
331.9Stv${TMACDIR}/tmac.${F}: ${F} _installtmac
341.1Stv.endfor
351.1Stv
361.8Sjmcafterinstall: ${TMACDIR}/tmac.an.old
371.9Stv${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an _installtmac
381.8Sjmc
391.1Stvafterinstall: ${TMACDIR}/tmac.an
401.9Stv${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc _installtmac
411.4Stv
421.12Stv# The silly walk below is because sometimes the files begin with "g",
431.12Stv# and sometimes not, depending on what the host tool has at build time.
441.12Stv
451.12Stvafterinstall: install.grofflinks
461.12Stvinstall.grofflinks:
471.4Stv.for F in eqn groff indxbib pic refer soelim tbl
481.12Stv	@cd ${.CURDIR} && ${MAKE} ${TOOLDIR}/bin/nb${F}
491.12Stv
501.12Stv.if exists(${TOOLDIR}/lib/groff/g${F})
511.12Stv${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/g${F}
521.12Stv.else
531.4Stv${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
541.12Stv.endif
551.4Stv	ln -f ${.ALLSRC} ${.TARGET}
561.4Stv.endfor
57