93b0ebda6ae4bee3ba0de75f9f75d1a247a0a786
[platform/upstream/groff.git] / font / devascii / Makefile.sub
1 # Makefile.sub for `font devascii'
2 #
3 # File position: <groff-source>/font/devascii/Makefile.sub
4 #
5 # Copyright (C) 2014
6 #   Free Software Foundation, Inc.
7 #
8 # Last update: 2 Sep 2014
9 #
10 # This file is part of `font utf8' which is part of `groff'.
11 #
12 # `groff' is free software; you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # `groff' is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 # General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program. If not, see
24 # <http://www.gnu.org/licenses/gpl-2.0.html>.
25 #
26 ########################################################################
27
28 DEV=ascii
29 FONTS=R I B BI
30 DEVFILES=$(FONTS) DESC
31 MOSTLYCLEANADD=$(FONTS) DESC
32
33 RES=240
34 CPI=10
35 LPI=6
36
37 RM=rm -f
38
39 $(FONTS): R.proto
40         @echo Making $@
41         @$(RM) $@
42         @charwidth=`expr $(RES) / $(CPI)` ; \
43          sed -e "s/^name [A-Z]*$$/name $@/" \
44              -e \
45               "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
46              -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
47              -e "s/^internalname .*$$/internalname $@/" \
48              -e "/^internalname/s/BI/3/" \
49              -e "/^internalname/s/B/2/" \
50              -e "/^internalname/s/I/1/" \
51              -e "/^internalname .*[^ 0-9]/d" \
52              $(srcdir)/R.proto >$@
53
54 DESC: DESC.proto
55         @echo Making $@
56         @sed -e "s/^res .*$$/res $(RES)/" \
57              -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
58              -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
59              -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
60              $(srcdir)/DESC.proto >$@
61
62 ########################################################################
63 # Emacs settings
64 ########################################################################
65 #
66 # Local Variables:
67 # mode: makefile
68 # End: