1 # $NetBSD: Makefile,v 1.7 2001/12/09 06:12:26 jmc Exp $ 2 3 MODULE= groff 4 5 ALL_TARGET= src/include all 6 MAKE_ARGS= bindir=${TOOLDIR}/lib/groff 7 8 TMACDIR= ${TOOLDIR}/share/groff/tmac 9 10 # Add gnuwrap hack directly to the Makefile. 11 _NOWRAPPER=1 12 .build_done: build/Makefile 13 build/Makefile: .configure_done 14 @printf '.include "${.CURDIR}/../Makefile.gnuwrap"\n' >>$@ 15 16 .include "${.CURDIR}/../Makefile.gnuhost" 17 18 .PATH: ${.CURDIR}/../../share/tmac 19 20 .for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html 21 afterinstall: ${TMACDIR}/tmac.${F} 22 .PHONY: ${TMACDIR}/tmac.${F} 23 # Get the hard coded path out of any files and put ${TMACDIR} in it's place 24 ${TMACDIR}/tmac.${F}: ${F} 25 @sed -e "s:/usr/share/tmac:${TMACDIR}:g" < ${.ALLSRC} > build/tmac/${F}.sed 26 .if defined(UPDATE) 27 @if ! cmp build/tmac/${F}.sed ${.TARGET} 2>/dev/null; then \ 28 echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET}; \ 29 ${HOST_INSTALL_FILE} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET}; \ 30 fi 31 .else 32 ${HOST_INSTALL_FILE} -m ${NONBINMODE} build/tmac/${F}.sed ${.TARGET} 33 .endif 34 .endfor 35 36 afterinstall: ${TMACDIR}/tmac.an 37 ${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc 38 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} 39 40 .for F in eqn groff indxbib pic refer soelim tbl 41 afterinstall: ${TOOLDIR}/bin/nb${F} 42 ${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F} 43 ln -f ${.ALLSRC} ${.TARGET} 44 .endfor 45