Makefile revision 1.24
11.24Slukem#	$NetBSD: Makefile,v 1.24 2003/08/22 00:12:18 lukem Exp $
21.1Stv
31.1StvMODULE=		groff
41.1Stv
51.1StvALL_TARGET=	src/include all
61.24SlukemMAKE_ARGS=	bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q} \
71.24Slukem		INSTALL_INFO=${TOOL_INSTALL_INFO:Q}
81.6Sjmc
91.6SjmcTMACDIR=	${TOOLDIR}/share/groff/tmac
101.19SwizSITETMACDIR=	${TOOLDIR}/share/groff/site-tmac
111.2Stv
121.2Stv# Add gnuwrap hack directly to the Makefile.
131.2Stv_NOWRAPPER=1
141.14Spk
151.14Spk# Fixup build/Makefile.
161.14Spk# XXX - the groff distribution Makefiles don't get their dependencies right.
171.14Spk#	We use internal knowledge to specify additional target ordering.
181.14Spk#	This can be removed once our own make(1) can be invoked in true
191.14Spk#	sequential (i.e. compatible) mode again for subdir makes.
201.14Spk#
211.21Smartin.configure_done: _post_conf
221.21Smartin_post_conf: .USE
231.21Smartin	@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
241.21Smartin	  echo '.ORDER: $$(ALLDIRS) dot';\
251.21Smartin	  echo '.ORDER: all install' ) >> build/Makefile
261.14Spk
271.1Stv
281.1Stv.include "${.CURDIR}/../Makefile.gnuhost"
291.1Stv
301.19Swiz.PATH:		${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac
311.1Stv
321.9Stv_installtmac: .USE
331.23Slukem.if ${MKUPDATE} != "no"
341.9Stv	@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
351.9Stv		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
361.9Stv		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
371.1Stv	fi
381.1Stv.else
391.9Stv	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
401.1Stv.endif
411.9Stv
421.15Spk#
431.15Spk# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall'
441.15Spk# sources below that depend on it must wait until `realinstall' is done.
451.15Spk#
461.19Swiz#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local
471.19Swiz.for F in doc2html
481.19Swizafterinstall:	${TMACDIR}/${F}.tmac
491.19Swiz.PHONY:		${TMACDIR}/${F}.tmac
501.19Swiz${TMACDIR}/${F}.tmac: ${F} _installtmac
511.19Swiz.ORDER: realinstall ${TMACDIR}/${F}.tmac
521.19Swiz.endfor
531.19Swiz.for F in man.local mdoc.local
541.19Swizafterinstall:	${SITETMACDIR}/${F}
551.19Swiz.PHONY:		${SITETMACDIR}/${F}
561.19Swiz${SITETMACDIR}/${F}: ${F} _installtmac
571.19Swiz.ORDER: realinstall ${SITETMACDIR}/${F}
581.1Stv.endfor
591.4Stv
601.12Stv# The silly walk below is because sometimes the files begin with "g",
611.12Stv# and sometimes not, depending on what the host tool has at build time.
621.12Stv
631.12Stvafterinstall: install.grofflinks
641.15Spk.ORDER: realinstall install.grofflinks
651.12Stvinstall.grofflinks:
661.13Stv	@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
671.13Stv
681.18Swiz.for F in eqn groff indxbib nroff pic refer soelim tbl
691.16Sthorpejinstall.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}
701.12Stv.if exists(${TOOLDIR}/lib/groff/g${F})
711.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F}
721.12Stv.else
731.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F}
741.12Stv.endif
751.4Stv	ln -f ${.ALLSRC} ${.TARGET}
761.4Stv.endfor
77