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