Makefile revision 1.8
11.8Sjmc#	$NetBSD: Makefile,v 1.8 2001/12/09 23:34:31 jmc Exp $
21.1Stv
31.1StvMODULE=		groff
41.1Stv
51.1StvALL_TARGET=	src/include all
61.4StvMAKE_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.1Stv.for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html
211.3Stvafterinstall:	${TMACDIR}/tmac.${F}
221.1Stv.PHONY:		${TMACDIR}/tmac.${F}
231.7Sjmc# Get the hard coded path out of any files and put ${TMACDIR} in it's place
241.1Stv${TMACDIR}/tmac.${F}: ${F}
251.7Sjmc	@sed -e "s:/usr/share/tmac:${TMACDIR}:g" < ${.ALLSRC} > build/tmac/${F}.sed
261.1Stv.if defined(UPDATE)
271.7Sjmc	@if ! cmp build/tmac/${F}.sed ${.TARGET} 2>/dev/null; then \
281.7Sjmc		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET}; \
291.7Sjmc		${HOST_INSTALL_FILE} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET}; \
301.1Stv	fi
311.1Stv.else
321.7Sjmc	${HOST_INSTALL_FILE} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET}
331.1Stv.endif
341.1Stv.endfor
351.1Stv
361.8Sjmcafterinstall: ${TMACDIR}/tmac.an.old
371.8Sjmc${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an
381.8Sjmc.if defined(UPDATE)
391.8Sjmc	@if ! cmp ${.ALLSRC} ${.TARGET} 2>/dev/null; then \
401.8Sjmc		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
411.8Sjmc		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
421.8Sjmc	fi
431.8Sjmc.else
441.8Sjmc	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
451.8Sjmc.endif
461.8Sjmc
471.1Stvafterinstall: ${TMACDIR}/tmac.an
481.1Stv${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc
491.8Sjmc.if defined(UPDATE)
501.8Sjmc	@if ! cmp ${.ALLSRC} ${.TARGET} 2>/dev/null; then \
511.8Sjmc		echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
521.8Sjmc		${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
531.8Sjmc	fi
541.8Sjmc.else
551.5Sperry	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
561.8Sjmc.endif
571.4Stv
581.4Stv.for F in eqn groff indxbib pic refer soelim tbl
591.4Stvafterinstall: ${TOOLDIR}/bin/nb${F}
601.4Stv${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
611.4Stv	ln -f ${.ALLSRC} ${.TARGET}
621.4Stv.endfor
63