1 # $FreeBSD: src/gnu/usr.bin/groff/tmac/Makefile,v 1.42 2003/09/08 17:46:33 ru Exp $
2 # $DragonFly: src/gnu/usr.bin/groff/tmac/Makefile,v 1.4 2005/09/09 14:11:04 asmodai Exp $
4 .include "../Makefile.inc"
8 TMACMODE?= ${NOBINMODE}
9 TMACDIR?= ${SHAREDIR}/tmac
10 MDOCDIR?= ${TMACDIR}/mdoc
12 MAN= groff_ms.7 groff_man.7 groff_me.7 groff_mdoc.7
13 MAN+= groff_trace.7 groff_www.7
14 MLINKS= groff_ms.7 ms.7
15 MLINKS+= groff_man.7 man.7
16 MLINKS+= groff_me.7 me.7
17 MLINKS+= groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7
19 PATCHES!= echo ${.CURDIR}/patches/*.patch
20 CONTRIBDIR= ${DIST_DIR}
23 CLEANFILES= ${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} ${NORMALFILES:S/$/-s/}
25 NORMALFILES= man.tmac mandoc.tmac andoc.tmac an-old.tmac an-ext.tmac \
30 a4.tmac papersize.tmac \
35 ps.tmac psold.tmac pspic.tmac psatk.tmac \
37 tty.tmac tty-char.tmac \
38 latin1.tmac latin2.tmac latin5.tmac latin9.tmac cp1047.tmac \
43 html.tmac html-end.tmac \
50 hyphen.us hyphenex.us \
53 de.tmac den.tmac hyphen.det hyphen.den hyphenex.det \
54 cs.tmac hyphen.cs hyphenex.cs
56 SPECIALFILES= an.tmac s.tmac www.tmac
57 STRIPFILES= e.tmac doc.tmac doc-old.tmac mdoc.local
58 MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms \
59 fr.ISO8859-1 ru.KOI8-R
61 all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} ${NORMALFILES:S/$/-s/}
63 .for f in ${MDOCFILES} ${STRIPFILES}
65 sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
68 .for f in ${SPECIALFILES}
70 sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
71 -e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
72 -e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \
73 ${.ALLSRC} > ${.TARGET}
76 .for f in ${NORMALFILES}
78 cp ${.ALLSRC} ${.TARGET}
83 ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
84 koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR}
86 .for f in ${STRIPFILES} ${SPECIALFILES} ${NORMALFILES}
87 ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
88 $f-s ${DESTDIR}${TMACDIR}/$f
90 .for f in ${MDOCFILES}
91 ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
92 $f-s ${DESTDIR}${MDOCDIR}/$f
94 .if !exists(${DESTDIR}${TMACDIR}/man.local)
95 ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
96 ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
99 .include <bsd.prog.mk>