NetBSD/tools/groff/Makefile

70 lines
2.0 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.14 2002/02/19 12:13:10 pk Exp $
MODULE= groff
ALL_TARGET= src/include all
2002-01-31 18:24:36 +03:00
MAKE_ARGS= bindir=${TOOLDIR}/lib/groff
TMACDIR= ${TOOLDIR}/share/groff/tmac
# Add gnuwrap hack directly to the Makefile.
_NOWRAPPER=1
#
# Fixup build/Makefile.
# XXX - the groff distribution Makefiles don't get their dependencies right.
# We use internal knowledge to specify additional target ordering.
# This can be removed once our own make(1) can be invoked in true
# sequential (i.e. compatible) mode again for subdir makes.
#
.configure_done: _post_conf
_post_conf: .USE
@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
echo '.ORDER: $$(ALLDIRS) dot';\
echo '.ORDER: all install' ) >> build/Makefile
.include "${.CURDIR}/../Makefile.gnuhost"
.PATH: ${.CURDIR}/../../share/tmac
_installtmac: .USE
.if defined(UPDATE)
@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
fi
.else
${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
.endif
.for F in andoc doc doc-ditroff doc-common doc-nroff doc-syms doc2html
afterinstall: ${TMACDIR}/tmac.${F}
.PHONY: ${TMACDIR}/tmac.${F}
${TMACDIR}/tmac.${F}: ${F} _installtmac
.endfor
afterinstall: ${TMACDIR}/tmac.an.old
${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an _installtmac
afterinstall: ${TMACDIR}/tmac.an
${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc _installtmac
# The silly walk below is because sometimes the files begin with "g",
# and sometimes not, depending on what the host tool has at build time.
afterinstall: install.grofflinks
install.grofflinks:
@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
.for F in eqn groff indxbib pic refer soelim tbl
install.grofflinks.recurse: ${TOOLDIR}/bin/nb${F}
.if exists(${TOOLDIR}/lib/groff/g${F})
${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/g${F}
.else
${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
.endif
ln -f ${.ALLSRC} ${.TARGET}
.endfor