xref: /netbsd-src/external/gpl2/groff/font/Makefile.tty (revision aef5eb5f59cdfe8314f1b5f78ac04eb144e44010)
1# $NetBSD: Makefile.tty,v 1.1 2016/01/13 19:01:59 christos Exp $
2
3# $FreeBSD: src/gnu/usr.bin/groff/font/Makefile.tty,v 2.7 2001/04/17 12:36:42 ru Exp $
4
5.include <bsd.own.mk>
6
7all: ${FONTS}
8
9FONTS?=R I B BI S L CW
10DEVFILES=$(FONTS) DESC
11CLEANFILES=$(DEVFILES)
12
13RES=240
14CPI=10
15LPI=6
16
17$(FONTS): R.proto
18	${_MKTARGET_CREATE}
19	(charwidth=`expr $(RES) / $(CPI)` ; \
20	 ${TOOL_SED} -e "s/^name [A-Z]*$$/name ${.TARGET}/" \
21	     -e "s/^\\([^	]*\\)	[0-9]+	/\\1	$$charwidth	/" \
22	     -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
23	     -e "s/^internalname .*$$/internalname $@/" \
24	     -e "/^internalname/s/BI/3/" \
25	     -e "/^internalname/s/B/2/" \
26	     -e "/^internalname/s/I/1/" \
27	     -e "/^internalname .*[^ 0-9]/d" \
28	     ${.ALLSRC} >$.${.TARGET})
29
30DESC: DESC.proto
31	${_MKTARGET_CREATE}
32	${TOOL_SED} -e "s/^res .*$$/res $(RES)/" \
33	    -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
34	    -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
35	    -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
36	    ${.ALLSRC} >${.TARGET}
37	echo "image_generator gs" >>${.TARGET}
38