No empty .Rs/.Re
[netbsd-mini2440.git] / tools / groff / Makefile
blob63fb06d3b5f0e29f33a205dc98309ceff30b6d95
1 # $NetBSD: Makefile,v 1.28 2006/02/06 23:48:35 tron Exp $
3 MODULE= groff
5 ALL_TARGET= src/include all
6 MAKE_ARGS= bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q} \
7 INSTALL_INFO=${TOOL_INSTALL_INFO:Q}
8 # we don't need any of the X applications
9 CONFIGURE_ARGS+= --without-x
11 TMACDIR= ${TOOLDIR}/share/groff/tmac
12 SITETMACDIR= ${TOOLDIR}/share/groff/site-tmac
14 # Add gnuwrap hack directly to the Makefile.
15 _NOWRAPPER=1
17 # Fixup build/Makefile.
18 # XXX - the groff distribution Makefiles don't get their dependencies right.
19 # We use internal knowledge to specify additional target ordering.
20 # This can be removed once our own make(1) can be invoked in true
21 # sequential (i.e. compatible) mode again for subdir makes.
23 .configure_done: _post_conf
24 _post_conf: .USE
25 @(echo '.include "${.CURDIR}/../Makefile.gnuwrap"'; \
26 echo '.ORDER: $$(ALLDIRS) dot';\
27 echo '.ORDER: all install' ) >> build/Makefile
31 .include "${.CURDIR}/../Makefile.gnuhost"
32 COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
33 .-include "${COMPATOBJ}/defs.mk"
35 .PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac
37 _installtmac: .USE
38 .if ${MKUPDATE} != "no"
39 @if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \
40 echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
41 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \
43 .else
44 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
45 .endif
48 # Since ${TMACDIR} is created by the `realinstall' target, the `afterinstall'
49 # sources below that depend on it must wait until `realinstall' is done.
51 #.for F in an andoc doc doc-ditroff doc-common doc-nroff doc-syms html html-end man man.local mdoc mdoc.local
52 .for F in doc2html
53 afterinstall: ${TMACDIR}/${F}.tmac
54 .PHONY: ${TMACDIR}/${F}.tmac
55 ${TMACDIR}/${F}.tmac: ${F} _installtmac
56 .ORDER: realinstall ${TMACDIR}/${F}.tmac
57 .endfor
58 .for F in man.local mdoc.local
59 afterinstall: ${SITETMACDIR}/${F}
60 .PHONY: ${SITETMACDIR}/${F}
61 ${SITETMACDIR}/${F}: ${F}-s _installtmac
62 .ORDER: realinstall ${SITETMACDIR}/${F}
63 CLEANFILES+=${F}-s
64 ${F}-s: ${F}
65 ${TOOL_SED} -f ${.CURDIR}/../../gnu/dist/groff/tmac/strip.sed \
66 ${.ALLSRC} > ${.TARGET}
67 .endfor
69 # The silly walk below is because sometimes the files begin with "g",
70 # and sometimes not, depending on what the host tool has at build time.
72 afterinstall: install.grofflinks
73 .ORDER: realinstall install.grofflinks
74 install.grofflinks:
75 @cd ${.CURDIR} && ${MAKE} install.grofflinks.recurse
77 .for F in eqn groff indxbib pic refer soelim tbl
78 install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}
79 .if exists(${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT})
80 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/g${F}${HOSTEXEEXT}
81 .else
82 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}${HOSTEXEEXT}: ${TOOLDIR}/lib/groff/${F}${HOSTEXEEXT}
83 .endif
84 ln -f ${.ALLSRC} ${.TARGET}
85 .endfor
87 .for F in nroff
88 install.grofflinks.recurse: ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}
89 .if exists(${TOOLDIR}/lib/groff/g${F})
90 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/g${F}
91 .else
92 ${TOOLDIR}/bin/${_TOOL_PREFIX}${F}: ${TOOLDIR}/lib/groff/${F}
93 .endif
94 ln -f ${.ALLSRC} ${.TARGET}
95 .endfor