Makefile revision 1.20
11.20Suwe# $NetBSD: Makefile,v 1.20 2003/06/30 23:26:36 uwe Exp $ 21.1Stv 31.1StvMODULE= groff 41.1Stv 51.1StvALL_TARGET= src/include all 61.20SuweMAKE_ARGS= bindir=${TOOLDIR}/lib/groff MAKEINFO=${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.19Swiz# XXX: 20030630: I think the next part is not needed -- 151.19Swiz# if it should be, please comment it in again. -- wiz 161.14Spk# 171.14Spk# Fixup build/Makefile. 181.14Spk# XXX - the groff distribution Makefiles don't get their dependencies right. 191.14Spk# We use internal knowledge to specify additional target ordering. 201.14Spk# This can be removed once our own make(1) can be invoked in true 211.14Spk# sequential (i.e. compatible) mode again for subdir makes. 221.14Spk# 231.19Swiz#.configure_done: _post_conf 241.19Swiz#_post_conf: .USE 251.19Swiz# @(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \ 261.19Swiz# echo '.ORDER: $$(ALLDIRS) dot';\ 271.19Swiz# echo '.ORDER: all install' ) >> build/Makefile 281.14Spk 291.1Stv 301.1Stv.include "${.CURDIR}/../Makefile.gnuhost" 311.1Stv 321.19Swiz.PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac 331.1Stv 341.9Stv_installtmac: .USE 351.1Stv.if defined(UPDATE) 361.9Stv @if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \ 371.9Stv echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 381.9Stv ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 391.1Stv fi 401.1Stv.else 411.9Stv ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} 421.1Stv.endif 431.9Stv 441.15Spk# 451.15Spk# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall' 461.15Spk# sources below that depend on it must wait until `realinstall' is done. 471.15Spk# 481.19Swiz#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local 491.19Swiz.for F in doc2html 501.19Swizafterinstall: ${TMACDIR}/${F}.tmac 511.19Swiz.PHONY: ${TMACDIR}/${F}.tmac 521.19Swiz${TMACDIR}/${F}.tmac: ${F} _installtmac 531.19Swiz.ORDER: realinstall ${TMACDIR}/${F}.tmac 541.19Swiz.endfor 551.19Swiz.for F in man.local mdoc.local 561.19Swizafterinstall: ${SITETMACDIR}/${F} 571.19Swiz.PHONY: ${SITETMACDIR}/${F} 581.19Swiz${SITETMACDIR}/${F}: ${F} _installtmac 591.19Swiz.ORDER: realinstall ${SITETMACDIR}/${F} 601.1Stv.endfor 611.4Stv 621.12Stv# The silly walk below is because sometimes the files begin with "g", 631.12Stv# and sometimes not, depending on what the host tool has at build time. 641.12Stv 651.12Stvafterinstall: install.grofflinks 661.15Spk.ORDER: realinstall install.grofflinks 671.12Stvinstall.grofflinks: 681.13Stv @cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse 691.13Stv 701.18Swiz.for F in eqn groff indxbib nroff pic refer soelim tbl 711.16Sthorpejinstall.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F} 721.12Stv.if exists(${TOOLDIR}/lib/groff/g${F}) 731.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F} 741.12Stv.else 751.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F} 761.12Stv.endif 771.4Stv ln -f ${.ALLSRC} ${.TARGET} 781.4Stv.endfor 79