groff: Commit our local patches.
[dragonfly.git] / gnu / usr.bin / groff / tmac / Makefile
1 # $FreeBSD: src/gnu/usr.bin/groff/tmac/Makefile,v 1.42 2003/09/08 17:46:33 ru Exp $
2
3 .include "../Makefile.inc"
4
5 TMACOWN?=       ${BINOWN}
6 TMACGRP?=       ${BINGRP}
7 TMACMODE?=      ${NOBINMODE}
8 TMACDIR?=       ${SHAREDIR}/tmac
9 MDOCDIR?=       ${TMACDIR}/mdoc
10
11 MAN=            groff_ms.7 groff_man.7 groff_me.7 groff_mdoc.7
12 MAN+=           groff_trace.7 groff_www.7
13 MLINKS=         groff_ms.7 ms.7
14 MLINKS+=        groff_man.7 man.7
15 MLINKS+=        groff_me.7 me.7
16 MLINKS+=        groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7
17
18 CONTRIBDIR=     ${DIST_DIR}
19
20 SRCS=           ${PATCHES}
21 CLEANFILES=     ${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} ${NORMALFILES:S/$/-s/}
22
23 NORMALFILES= man.tmac mandoc.tmac andoc.tmac an-old.tmac an-ext.tmac \
24         ms.tmac \
25         me.tmac \
26         mdoc.tmac \
27         pic.tmac \
28         a4.tmac papersize.tmac \
29         62bit.tmac \
30         ec.tmac \
31         safer.tmac \
32         trace.tmac \
33         ps.tmac psold.tmac pspic.tmac psatk.tmac \
34         dvi.tmac \
35         tty.tmac tty-char.tmac \
36         latin1.tmac latin2.tmac latin5.tmac latin9.tmac cp1047.tmac \
37         unicode.tmac \
38         X.tmac Xps.tmac \
39         lj4.tmac \
40         lbp.tmac \
41         html.tmac html-end.tmac \
42         devtag.tmac \
43         europs.tmac \
44         composite.tmac \
45         eqnrc \
46         troffrc troffrc-end \
47         trans.tmac \
48         hyphen.us hyphenex.us \
49         fr.tmac hyphen.fr \
50         sv.tmac hyphen.sv \
51         de.tmac den.tmac hyphen.det hyphen.den hyphenex.det \
52         cs.tmac hyphen.cs hyphenex.cs
53
54 SPECIALFILES=   an.tmac s.tmac www.tmac
55 STRIPFILES=     e.tmac doc.tmac doc-old.tmac mdoc.local
56 MDOCFILES=      doc-common doc-ditroff doc-nroff doc-syms \
57                 fr.ISO8859-1 ru.KOI8-R
58
59 all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} ${NORMALFILES:S/$/-s/}
60
61 .for f in ${MDOCFILES} ${STRIPFILES}
62 $f-s: $f
63         sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
64 .endfor
65
66 .for f in ${SPECIALFILES}
67 $f-s: $f
68         sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
69             -e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
70             -e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \
71                 ${.ALLSRC} > ${.TARGET}
72 .endfor
73
74 .for f in ${NORMALFILES}
75 $f-s: $f
76         cp ${.ALLSRC} ${.TARGET}
77 .endfor
78
79 beforeinstall:
80         cd ${.CURDIR}; \
81             ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
82             koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR}
83 .for f in ${STRIPFILES} ${SPECIALFILES} ${NORMALFILES}
84         cd ${.OBJDIR}; \
85         ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
86             $f-s ${DESTDIR}${TMACDIR}/$f
87 .endfor
88 .for f in ${MDOCFILES}
89         cd ${.OBJDIR}; \
90         ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
91             $f-s ${DESTDIR}${MDOCDIR}/$f
92 .endfor
93 .if !exists(${DESTDIR}${TMACDIR}/man.local)
94         cd ${.OBJDIR}; \
95         ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
96             ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
97 .endif
98
99 .include <bsd.prog.mk>