Makefile.tty revision 18140
1#	@(#)Makefile.tty	6.1 (Berkeley) 3/3/91
2#
3# Modified for Berkeley Unix by Donn Seeley, donn@okeeffe.berkeley.edu
4#
5#Copyright (C) 1989, 1990 Free Software Foundation, Inc.
6#     Written by James Clark (jjc@jclark.uucp)
7#
8#This file is part of groff.
9#
10#groff is free software; you can redistribute it and/or modify it under
11#the terms of the GNU General Public License as published by the Free
12#Software Foundation; either version 1, or (at your option) any later
13#version.
14#
15#groff is distributed in the hope that it will be useful, but WITHOUT ANY
16#WARRANTY; without even the implied warranty of MERCHANTABILITY or
17#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18#for more details.
19#
20#You should have received a copy of the GNU General Public License along
21#with groff; see the file LICENSE.  If not, write to the Free Software
22#Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23
24.MAIN: all
25
26RES=240
27CPI=10
28LPI=6
29FONTS=R I B BI S L
30
31DEVFILES=$(FONTS) DESC
32CLEANFILES=$(DEVFILES)
33
34$(FONTS): R.proto
35	@${ECHO} Making $@
36	@(charwidth=`echo  $(RES) / $(CPI) | bc` ; \
37 	 sed -e "s/^name [A-Z]*$$/name $@/" \
38	     -e "s/^\\([^	]*\\)	[0-9]+	/\\1	$$charwidth	/" \
39	     -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
40	     -e "s/^internalname .*$$/internalname $@/" \
41	     -e "/^internalname/s/BI/3/" \
42	     -e "/^internalname/s/B/2/" \
43	     -e "/^internalname/s/I/1/" \
44	     -e "/^internalname .*[^ 0-9]/d" \
45	     ${DISTDIR}/R.proto >$@)
46
47DESC: DESC.proto
48	@${ECHO} Making $@
49	@sed -e "s/^res .*$$/res $(RES)/" \
50	    -e "s/^hor .*$$/hor `echo $(RES) / $(CPI) | bc`/" \
51	    -e "s/^vert .*$$/vert `echo $(RES) / $(LPI) | bc`/" \
52	    -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
53	    ${DISTDIR}/DESC.proto >$@
54
55beforeinstall:: ${DEVFILES}
56