Makefile revision 1.19
1# $NetBSD: Makefile,v 1.19 2003/06/30 18:14:28 wiz Exp $ 2 3MODULE= groff 4 5ALL_TARGET= src/include all 6MAKE_ARGS= bindir=${TOOLDIR}/lib/groff 7 8TMACDIR= ${TOOLDIR}/share/groff/tmac 9SITETMACDIR= ${TOOLDIR}/share/groff/site-tmac 10 11# Add gnuwrap hack directly to the Makefile. 12_NOWRAPPER=1 13 14# XXX: 20030630: I think the next part is not needed -- 15# if it should be, please comment it in again. -- wiz 16# 17# Fixup build/Makefile. 18# XXX - the groff distribution Makefiles don't get their dependencies right. 19# We use internal knowledge to specify additional target ordering. 20# This can be removed once our own make(1) can be invoked in true 21# sequential (i.e. compatible) mode again for subdir makes. 22# 23#.configure_done: _post_conf 24#_post_conf: .USE 25# @(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \ 26# echo '.ORDER: $$(ALLDIRS) dot';\ 27# echo '.ORDER: all install' ) >> build/Makefile 28 29 30.include "${.CURDIR}/../Makefile.gnuhost" 31 32.PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac 33 34_installtmac: .USE 35.if defined(UPDATE) 36 @if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \ 37 echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 38 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 39 fi 40.else 41 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} 42.endif 43 44# 45# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall' 46# sources below that depend on it must wait until `realinstall' is done. 47# 48#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local 49.for F in doc2html 50afterinstall: ${TMACDIR}/${F}.tmac 51.PHONY: ${TMACDIR}/${F}.tmac 52${TMACDIR}/${F}.tmac: ${F} _installtmac 53.ORDER: realinstall ${TMACDIR}/${F}.tmac 54.endfor 55.for F in man.local mdoc.local 56afterinstall: ${SITETMACDIR}/${F} 57.PHONY: ${SITETMACDIR}/${F} 58${SITETMACDIR}/${F}: ${F} _installtmac 59.ORDER: realinstall ${SITETMACDIR}/${F} 60.endfor 61 62# The silly walk below is because sometimes the files begin with "g", 63# and sometimes not, depending on what the host tool has at build time. 64 65afterinstall: install.grofflinks 66.ORDER: realinstall install.grofflinks 67install.grofflinks: 68 @cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse 69 70.for F in eqn groff indxbib nroff pic refer soelim tbl 71install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F} 72.if exists(${TOOLDIR}/lib/groff/g${F}) 73${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F} 74.else 75${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F} 76.endif 77 ln -f ${.ALLSRC} ${.TARGET} 78.endfor 79