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