Makefile revision 1.29
11.29Sapb# $NetBSD: Makefile,v 1.29 2008/10/25 22:15:28 apb 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.28Stron# we don't need any of the X applications 91.28StronCONFIGURE_ARGS+= --without-x 101.6Sjmc 111.6SjmcTMACDIR= ${TOOLDIR}/share/groff/tmac 121.19SwizSITETMACDIR= ${TOOLDIR}/share/groff/site-tmac 131.2Stv 141.2Stv# Add gnuwrap hack directly to the Makefile. 151.2Stv_NOWRAPPER=1 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.21Smartin.configure_done: _post_conf 241.21Smartin_post_conf: .USE 251.21Smartin @(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \ 261.21Smartin echo '.ORDER: $$(ALLDIRS) dot';\ 271.21Smartin echo '.ORDER: all install' ) >> build/Makefile 281.14Spk 291.1Stv 301.27Sross 311.1Stv.include "${.CURDIR}/../Makefile.gnuhost" 321.27SrossCOMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR} 331.27Sross.-include "${COMPATOBJ}/defs.mk" 341.1Stv 351.19Swiz.PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac 361.1Stv 371.9Stv_installtmac: .USE 381.23Slukem.if ${MKUPDATE} != "no" 391.9Stv @if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \ 401.9Stv echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 411.9Stv ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ 421.1Stv fi 431.1Stv.else 441.9Stv ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} 451.1Stv.endif 461.9Stv 471.15Spk# 481.15Spk# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall' 491.15Spk# sources below that depend on it must wait until `realinstall' is done. 501.15Spk# 511.19Swiz#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local 521.19Swiz.for F in doc2html 531.19Swizafterinstall: ${TMACDIR}/${F}.tmac 541.19Swiz.PHONY: ${TMACDIR}/${F}.tmac 551.19Swiz${TMACDIR}/${F}.tmac: ${F} _installtmac 561.19Swiz.ORDER: realinstall ${TMACDIR}/${F}.tmac 571.19Swiz.endfor 581.19Swiz.for F in man.local mdoc.local 591.19Swizafterinstall: ${SITETMACDIR}/${F} 601.19Swiz.PHONY: ${SITETMACDIR}/${F} 611.25Swiz${SITETMACDIR}/${F}: ${F}-s _installtmac 621.19Swiz.ORDER: realinstall ${SITETMACDIR}/${F} 631.26SlukemCLEANFILES+=${F}-s 641.25Swiz${F}-s: ${F} 651.29Sapb ${TOOL_SED} -f ${.CURDIR}/../../gnu/dist/groff/tmac/strip.sed \ 661.29Sapb ${.ALLSRC} > ${.TARGET} 671.1Stv.endfor 681.4Stv 691.12Stv# The silly walk below is because sometimes the files begin with "g", 701.12Stv# and sometimes not, depending on what the host tool has at build time. 711.12Stv 721.12Stvafterinstall: install.grofflinks 731.15Spk.ORDER: realinstall install.grofflinks 741.12Stvinstall.grofflinks: 751.13Stv @cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse 761.13Stv 771.27Sross.for F in eqn groff indxbib pic refer soelim tbl 781.27Srossinstall.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT} 791.27Sross.if exists(${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT}) 801.27Sross${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT} 811.27Sross.else 821.27Sross${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/${F}${HOSTEXEEXT} 831.27Sross.endif 841.27Sross ln -f ${.ALLSRC} ${.TARGET} 851.27Sross.endfor 861.27Sross 871.27Sross.for F in nroff 881.16Sthorpejinstall.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F} 891.12Stv.if exists(${TOOLDIR}/lib/groff/g${F}) 901.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F} 911.12Stv.else 921.16Sthorpej${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F} 931.12Stv.endif 941.4Stv ln -f ${.ALLSRC} ${.TARGET} 951.4Stv.endfor 96