1# $NetBSD: Makefile,v 1.1 2016/01/13 19:02:01 christos Exp $
2
3# $FreeBSD: src/gnu/usr.bin/groff/tmac/Makefile,v 1.41 2003/05/01 13:22:21 ru Exp $
4
5SUBDIR=	man mom mm
6
7TMACOWN?=	${BINOWN}
8TMACGRP?=	${BINGRP}
9TMACMODE?=	${NOBINMODE}
10# XXX: next depends on ../src/include/defs.h
11TMACDIR?=	/usr/share/tmac
12MDOCDIR?=	${TMACDIR}/mdoc
13
14CLEANFILES=	${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
15
16# XXX: hyphen.ru
17NORMALFILES=	mandoc.tmac andoc.tmac an-old.tmac \
18		me.tmac \
19		mdoc.tmac \
20		pic.tmac \
21		a4.tmac \
22		papersize.tmac \
23		ec.tmac \
24		safer.tmac \
25		trace.tmac \
26		ps.tmac psold.tmac pspic.tmac psatk.tmac \
27		dvi.tmac \
28		tty.tmac tty-char.tmac \
29		latin1.tmac latin2.tmac latin9.tmac cp1047.tmac ascii.tmac \
30		unicode.tmac \
31		X.tmac Xps.tmac \
32		lj4.tmac \
33		lbp.tmac \
34		html.tmac html-end.tmac \
35		devtag.tmac \
36		europs.tmac \
37		composite.tmac \
38		eqnrc \
39		troffrc troffrc-end \
40		hyphen.us hyphenex.us
41SPECIALFILES=	an.tmac man.tmac s.tmac ms.tmac www.tmac
42STRIPFILES=	e.tmac doc.tmac man.local mdoc.local
43MDOCFILES=	doc-common doc-ditroff doc-nroff doc-syms \
44		fr.ISO8859-1 ru.KOI8-R
45
46.include <bsd.own.mk>
47
48.if ${MKSHARE} != "no"
49FILESDIR=	${TMACDIR}
50realall: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
51
52.for f in ${MDOCFILES}
53FILES+= $f-s
54FILESNAME_$f-s=mdoc/$f
55$f-s: $f
56	${_MKTARGET_CREATE}
57	${TOOL_SED} -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
58.endfor
59
60.for f in ${STRIPFILES}
61FILES+= $f-s
62FILESNAME_$f-s=$f
63$f-s: $f
64	${_MKTARGET_CREATE}
65	${TOOL_SED} -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
66.endfor
67
68.for f in ${SPECIALFILES}
69FILES+= $f-s
70FILESNAME_$f-s=$f
71$f-s: $f
72	${_MKTARGET_CREATE}
73	${TOOL_SED} -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
74	    -e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
75	    -e "s;@PNMTOPS_NOSETPAGE@;pnmtops -nosetpage;g" \
76		${.ALLSRC} > ${.TARGET}
77.endfor
78
79FILES+=	${NORMALFILES}
80.endif
81
82.include <bsd.prog.mk>
83.include <bsd.subdir.mk>
84