Makefile revision 1.22
11.22Slukem#	$NetBSD: Makefile,v 1.22 2003/07/10 10:34:43 lukem Exp $
21.1Stv
31.1StvMODULE=		groff
41.1Stv
51.1StvALL_TARGET=	src/include all
61.22SlukemMAKE_ARGS=	bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q}
71.6Sjmc
81.6SjmcTMACDIR=	${TOOLDIR}/share/groff/tmac
91.19SwizSITETMACDIR=	${TOOLDIR}/share/groff/site-tmac
101.2Stv
111.2Stv# Add gnuwrap hack directly to the Makefile.
121.2Stv_NOWRAPPER=1
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.21Smartin.configure_done: _post_conf
211.21Smartin_post_conf: .USE
221.21Smartin	@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
231.21Smartin	  echo '.ORDER: $$(ALLDIRS) dot';\
241.21Smartin	  echo '.ORDER: all install' ) >> build/Makefile
251.14Spk
261.1Stv
271.1Stv.include "${.CURDIR}/../Makefile.gnuhost"
281.1Stv
291.19Swiz.PATH:		${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/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.15Spk#
421.15Spk# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall'
431.15Spk# sources below that depend on it must wait until `realinstall' is done.
441.15Spk#
451.19Swiz#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local
461.19Swiz.for F in doc2html
471.19Swizafterinstall:	${TMACDIR}/${F}.tmac
481.19Swiz.PHONY:		${TMACDIR}/${F}.tmac
491.19Swiz${TMACDIR}/${F}.tmac: ${F} _installtmac
501.19Swiz.ORDER: realinstall ${TMACDIR}/${F}.tmac
511.19Swiz.endfor
521.19Swiz.for F in man.local mdoc.local
531.19Swizafterinstall:	${SITETMACDIR}/${F}
541.19Swiz.PHONY:		${SITETMACDIR}/${F}
551.19Swiz${SITETMACDIR}/${F}: ${F} _installtmac
561.19Swiz.ORDER: realinstall ${SITETMACDIR}/${F}
571.1Stv.endfor
581.4Stv
591.12Stv# The silly walk below is because sometimes the files begin with "g",
601.12Stv# and sometimes not, depending on what the host tool has at build time.
611.12Stv
621.12Stvafterinstall: install.grofflinks
631.15Spk.ORDER: realinstall install.grofflinks
641.12Stvinstall.grofflinks:
651.13Stv	@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
661.13Stv
671.18Swiz.for F in eqn groff indxbib nroff pic refer soelim tbl
681.16Sthorpejinstall.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}
691.12Stv.if exists(${TOOLDIR}/lib/groff/g${F})
701.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F}
711.12Stv.else
721.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F}
731.12Stv.endif
741.4Stv	ln -f ${.ALLSRC} ${.TARGET}
751.4Stv.endfor
76