2008-10-26 02:15:28 +04:00
|
|
|
# $NetBSD: Makefile,v 1.29 2008/10/25 22:15:28 apb Exp $
|
2001-11-13 02:16:17 +03:00
|
|
|
|
|
|
|
MODULE= groff
|
|
|
|
|
|
|
|
ALL_TARGET= src/include all
|
2003-08-22 04:12:18 +04:00
|
|
|
MAKE_ARGS= bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q} \
|
|
|
|
INSTALL_INFO=${TOOL_INSTALL_INFO:Q}
|
2006-02-07 02:48:35 +03:00
|
|
|
# we don't need any of the X applications
|
|
|
|
CONFIGURE_ARGS+= --without-x
|
2001-11-13 02:16:17 +03:00
|
|
|
|
2001-11-28 08:01:59 +03:00
|
|
|
TMACDIR= ${TOOLDIR}/share/groff/tmac
|
2003-06-30 22:14:28 +04:00
|
|
|
SITETMACDIR= ${TOOLDIR}/share/groff/site-tmac
|
2001-11-28 08:01:59 +03:00
|
|
|
|
2001-11-13 07:28:27 +03:00
|
|
|
# Add gnuwrap hack directly to the Makefile.
|
|
|
|
_NOWRAPPER=1
|
2002-02-19 15:13:10 +03:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
2003-07-06 02:05:28 +04:00
|
|
|
.configure_done: _post_conf
|
|
|
|
_post_conf: .USE
|
|
|
|
@(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
|
|
|
|
echo '.ORDER: $$(ALLDIRS) dot';\
|
|
|
|
echo '.ORDER: all install' ) >> build/Makefile
|
2002-02-19 15:13:10 +03:00
|
|
|
|
2001-11-13 07:28:27 +03:00
|
|
|
|
2004-02-06 03:06:53 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.include "${.CURDIR}/../Makefile.gnuhost"
|
2004-02-06 03:06:53 +03:00
|
|
|
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
|
|
|
|
.-include "${COMPATOBJ}/defs.mk"
|
2001-11-13 02:16:17 +03:00
|
|
|
|
2003-06-30 22:14:28 +04:00
|
|
|
.PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac
|
2001-11-13 02:16:17 +03:00
|
|
|
|
2002-01-03 19:38:50 +03:00
|
|
|
_installtmac: .USE
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} != "no"
|
2002-01-03 19:38:50 +03:00
|
|
|
@if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
|
2001-12-10 02:34:31 +03:00
|
|
|
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
|
|
|
|
|
2002-03-01 18:39:00 +03:00
|
|
|
#
|
|
|
|
# Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall'
|
|
|
|
# sources below that depend on it must wait until `realinstall' is done.
|
|
|
|
#
|
2003-06-30 22:14:28 +04:00
|
|
|
#.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local
|
|
|
|
.for F in doc2html
|
|
|
|
afterinstall: ${TMACDIR}/${F}.tmac
|
|
|
|
.PHONY: ${TMACDIR}/${F}.tmac
|
|
|
|
${TMACDIR}/${F}.tmac: ${F} _installtmac
|
|
|
|
.ORDER: realinstall ${TMACDIR}/${F}.tmac
|
|
|
|
.endfor
|
|
|
|
.for F in man.local mdoc.local
|
|
|
|
afterinstall: ${SITETMACDIR}/${F}
|
|
|
|
.PHONY: ${SITETMACDIR}/${F}
|
2003-10-20 12:25:36 +04:00
|
|
|
${SITETMACDIR}/${F}: ${F}-s _installtmac
|
2003-06-30 22:14:28 +04:00
|
|
|
.ORDER: realinstall ${SITETMACDIR}/${F}
|
2003-10-28 10:46:16 +03:00
|
|
|
CLEANFILES+=${F}-s
|
2003-10-20 12:25:36 +04:00
|
|
|
${F}-s: ${F}
|
2008-10-26 02:15:28 +04:00
|
|
|
${TOOL_SED} -f ${.CURDIR}/../../gnu/dist/groff/tmac/strip.sed \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
2002-01-03 19:38:50 +03:00
|
|
|
.endfor
|
2001-11-15 01:13:39 +03:00
|
|
|
|
2002-02-01 01:43:33 +03:00
|
|
|
# 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
|
2002-03-01 18:39:00 +03:00
|
|
|
.ORDER: realinstall install.grofflinks
|
2002-02-01 01:43:33 +03:00
|
|
|
install.grofflinks:
|
2002-02-01 16:51:38 +03:00
|
|
|
@cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
|
2002-02-01 01:43:33 +03:00
|
|
|
|
2004-02-06 03:06:53 +03:00
|
|
|
.for F in eqn groff indxbib pic refer soelim tbl
|
|
|
|
install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}
|
|
|
|
.if exists(${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT})
|
|
|
|
${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT}
|
|
|
|
.else
|
|
|
|
${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/${F}${HOSTEXEEXT}
|
|
|
|
.endif
|
|
|
|
ln -f ${.ALLSRC} ${.TARGET}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for F in nroff
|
2002-12-08 23:19:56 +03:00
|
|
|
install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}
|
2002-02-01 01:43:33 +03:00
|
|
|
.if exists(${TOOLDIR}/lib/groff/g${F})
|
2002-12-08 23:19:56 +03:00
|
|
|
${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F}
|
2002-02-01 01:43:33 +03:00
|
|
|
.else
|
2002-12-08 23:19:56 +03:00
|
|
|
${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F}
|
2002-02-01 01:43:33 +03:00
|
|
|
.endif
|
2001-11-15 01:13:39 +03:00
|
|
|
ln -f ${.ALLSRC} ${.TARGET}
|
|
|
|
.endfor
|