Bring in some changes from FreeBSD:
[dragonfly.git] / gnu / usr.bin / groff / font / Makefile.tty
CommitLineData
c8ac5d24
SW
1# $FreeBSD: src/gnu/usr.bin/groff/font/Makefile.tty,v 2.8 2005/10/20 10:57:52 ru Exp $
2# $DragonFly: src/gnu/usr.bin/groff/font/Makefile.tty,v 1.4 2008/03/02 23:02:01 swildner Exp $
984263bc
MD
3
4FONTS?=R I B BI S L CW
5DEVFILES=$(FONTS) DESC
6CLEANFILES=$(DEVFILES)
7
8RES=240
9CPI=10
10LPI=6
11
12$(FONTS): R.proto
13 @${ECHO} Making ${.TARGET}
14 @(charwidth=`expr $(RES) / $(CPI)` ; \
15 sed -e "s/^name [A-Z]*$$/name ${.TARGET}/" \
16 -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
17 -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
18 -e "s/^internalname .*$$/internalname $@/" \
19 -e "/^internalname/s/BI/3/" \
20 -e "/^internalname/s/B/2/" \
21 -e "/^internalname/s/I/1/" \
22 -e "/^internalname .*[^ 0-9]/d" \
23 ${.ALLSRC} >$.${.TARGET})
24
25DESC: DESC.proto
26 @${ECHO} Making ${.TARGET}
27 @sed -e "s/^res .*$$/res $(RES)/" \
28 -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
29 -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
30 -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
31 ${.ALLSRC} >${.TARGET}
c8ac5d24
SW
32.if defined(DESC_EXT)
33 @${DESC_EXT} >>${.TARGET}
34.endif