bcc8229efd26b6659059a1eaadd03c7e78282884
[platform/upstream/groff.git] / src / utils / xtotroff / Makefile.in
1 # Copyright (C) 2004-2014  Free Software Foundation, Inc.
2 #      Written by James Clark (jjc@jclark.com)
3 #
4 # This file is part of groff.
5 #
6 # groff is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 builddir=@abs_builddir@
20 top_srcdir=@abs_top_srcdir@
21 top_builddir=@abs_top_builddir@
22 SHELL=@SHELL@
23
24 devdir=$(top_builddir)/font
25 driverdir=$(top_srcdir)/src/devices/xditview
26 mkinstalldirs=$(SHELL) $(top_srcdir)/mkinstalldirs
27
28 xtotroff=$(builddir)/xtotroff
29 DPIS=75 100
30
31 RM=rm -f
32
33 all:
34         @echo "Say \`make fonts' to generate fonts for gxditview."
35
36 fonts: $(xtotroff) $(driverdir)/DESC.in $(driverdir)/FontMap
37         fonts=`sed -e 's/[       ].*//' $(driverdir)/FontMap`; \
38         for dpi in $(DPIS); do \
39           echo Making devX$$dpi; \
40           test -d $(devdir)/devX$$dpi \
41             || $(mkinstalldirs) $(devdir)/devX$$dpi; \
42           $(RM) $(devdir)/devX$$dpi/DESC; \
43           sed -e "s/res 75/res $$dpi/" $(driverdir)/DESC.in \
44             >$(devdir)/devX$$dpi/DESC; \
45           (cd $(devdir)/devX$$dpi; \
46            $(RM) Makefile.sub; \
47            echo DEV=X$$dpi >Makefile.sub; \
48            echo DEVFILES=DESC $$fonts >>Makefile.sub; \
49            $(xtotroff) -r $$dpi -s 10 $(driverdir)/FontMap); \
50           echo Making devX$$dpi-12; \
51           test -d $(devdir)/devX$$dpi-12 \
52             || $(mkinstalldirs) $(devdir)/devX$$dpi-12; \
53           $(RM) $(devdir)/devX$$dpi-12/DESC; \
54           sed -e "s/res 75/res $$dpi/" \
55               -e 's/unitwidth 10/unitwidth 12/' $(driverdir)/DESC.in \
56             >$(devdir)/devX$$dpi-12/DESC; \
57           (cd $(devdir)/devX$$dpi-12; \
58            $(RM) Makefile.sub; \
59            echo DEV=X$$dpi-12 >Makefile.sub; \
60            echo DEVFILES=DESC $$fonts >>Makefile.sub; \
61            $(xtotroff) -r $$dpi -s 12 $(driverdir)/FontMap); \
62         done
63
64 ########################################################################
65 # Emacs settings
66 ########################################################################
67 #
68 # Local Variables:
69 # mode: makefile
70 # End: