1 # Makefile.sub for `font devpdf'
3 # File position: <groff-source>/font/devpdf/Makefile.sub
5 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
6 # Written by Deri James <deri@chuzzlewit.demon.co.uk>
8 # This file is part of groff.
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 3 of the License, or
13 # (at your option) any later version.
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
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
25 && find * -maxdepth 0 -type f ! -name 'Makefile.sub*' \
26 -exec grep -l internalname {} \;`
27 ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
28 MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
39 MOSTLYCLEANDIRADD=enc map
44 #DEVSCRIPTS=util/BuildFoundries
56 cat $(srcdir)/DESC.in >$(top_builddir)/font/devpdf/DESC
57 if test "$(PAGE)" = A4; then \
58 echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \
60 echo "papersize letter" >>$(top_builddir)/font/devpdf/DESC; \
63 cat $(srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry
64 -test -d $(top_builddir)/font/devpdf/enc \
65 || $(mkinstalldirs) $(top_builddir)/font/devpdf/enc
66 -test -d $(top_builddir)/font/devpdf/map \
67 || $(mkinstalldirs) $(top_builddir)/font/devpdf/map
68 cp -f $(top_srcdir)/font/devps/text.enc \
69 $(top_builddir)/font/devpdf/enc
70 cp -f $(top_srcdir)/font/devps/symbolmap \
71 $(top_builddir)/font/devpdf/map
72 cp -f $(top_srcdir)/font/devps/generate/dingbats.map \
73 $(top_builddir)/font/devpdf/map
74 cp -f $(top_srcdir)/font/devps/generate/textmap \
75 $(top_builddir)/font/devpdf/map
76 cp -f $(top_srcdir)/font/devps/generate/symbolchars \
77 $(top_builddir)/font/devpdf/map
78 -test -d util || $(mkinstalldirs) util
79 $(RM) util/BuildFoundries
80 if test -n "$(PERL)"; then \
81 sed -f $(SH_DEPS_SED_SCRIPT) \
82 -e "s|/usr/bin/perl|$(PERL)|" \
83 -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(GHOSTSCRIPT)|" \
84 -e "s|@VERSION@|$(version)$(revision)|" \
85 -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
86 $(srcdir)/util/BuildFoundries.pl \
87 >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
89 sed -f $(SH_DEPS_SED_SCRIPT) \
90 -e "s|@VERSION@|$(version)$(revision)|" \
91 -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
92 $(srcdir)/util/BuildFoundries.pl \
93 >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
95 chmod +x util/BuildFoundries
96 echo "# foundry ps name psfile" > $(top_builddir)/font/devpdf/download
97 PATH="$(top_builddir)/src/utils/afmtodit:$(GROFF_PATH_SEPARATOR)$(PATH)" \
98 util/BuildFoundries $(top_builddir)/font/devpdf \
99 '$(top_srcdir)/font/devps : $(top_builddir)/font/devps' \
100 >> $(top_builddir)/font/devpdf/download
103 -test -d $(DESTDIR)$(fontsubdir) \
104 || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)
105 -test -d $(DESTDIR)$(fontsubdir)/enc \
106 || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/enc
107 -test -d $(DESTDIR)$(fontsubdir)/map \
108 || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/map
109 -test -d $(DESTDIR)$(fontsubdir)/util \
110 || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/util
111 for f in $(MOSTLYCLEANADD); do \
112 $(RM) $(DESTDIR)$(fontsubdir)/$$f; \
113 if test -f $$f; then \
114 $(INSTALL_DATA) $$f $(DESTDIR)$(fontsubdir)/$$f; \
116 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \
121 -for f in $(MOSTLYCLEANADD); do \
122 $(RM) $(DESTDIR)$(fontsubdir)/$$f; \
124 -d=$(DESTDIR)$(fontsubdir)/enc; \
125 if test -d $$d; then rmdir $$d; fi
126 -d=$(DESTDIR)$(fontsubdir)/map; \
127 if test -d $$d; then rmdir $$d; fi
128 -d=$(DESTDIR)$(fontsubdir)/util; \
129 if test -d $$d; then rmdir $$d; fi
130 -d=$(DESTDIR)$(fontsubdir); \
131 if test -d $$d; then rmdir $$d; fi
133 ########################################################################
135 ########################################################################