blob: edce36575af6a3c397c333c0c612e335cac43c72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
# Written by Deri James <deri@chuzzlewit.myzen.co.uk>
# Automake migration by Bertrand Garrigues
# <bertrand.garrigues@laposte.net>
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
devpdf_srcdir = $(top_srcdir)/font/devpdf
GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
&& grep -ls internalname [A-CEG-Z]*`
ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
MOSTLYCLEANFILES += \
font/devpdf/download \
font/devpdf/DESC \
font/devpdf/Foundry \
font/devpdf/util/BuildFoundries
devpdffontdir = $(fontdir)/devpdf
devpdffont_DATA = \
font/devpdf/DESC \
font/devpdf/Foundry
devpdffontencdir = $(devpdffontdir)/enc
devpdffontenc_DATA = font/devpdf/enc/text.enc
devpdffontmapdir = $(devpdffontdir)/map
devpdffontmapdata = \
font/devpdf/map/dingbats.map \
font/devpdf/map/symbol.map \
font/devpdf/map/symbolchars \
font/devpdf/map/text.map
devpdffontmap_DATA = $(devpdffontmapdata)
EXTRA_DIST += \
font/devpdf/DESC.in \
font/devpdf/Foundry.in \
font/devpdf/util/BuildFoundries.pl
all: font/devpdf/stamp
font/devpdf/enc/text.enc:
$(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/enc
$(AM_V_at)cp -f $(top_srcdir)/font/devps/text.enc \
$(top_builddir)/font/devpdf/enc
$(devpdffontmapdata):
$(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/map
$(AM_V_at)cp -f \
$(top_srcdir)/font/devps/generate/`basename $@` \
$(top_builddir)/font/devpdf/map
MOSTLYCLEANFILES += font/devpdf/util/BuildFoundries
font/devpdf/util/BuildFoundries: \
$(devpdf_srcdir)/util/BuildFoundries.pl $(SH_DEPS_SED_SCRIPT) afmtodit
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf/util \
&& if test -n "$(PERL)"; then \
sed -f $(SH_DEPS_SED_SCRIPT) \
-e "s|/usr/bin/perl|$(PERL)|" \
-e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|" \
-e "s|[@]PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|" \
-e "s|[@]VERSION[@]|$(VERSION)|" \
-e "s|[@]GROFF_FONT_DIR[@]|$(fontdir)|" \
$(devpdf_srcdir)/util/BuildFoundries.pl \
>$(top_builddir)/font/devpdf/util/BuildFoundries; \
else \
sed -f $(SH_DEPS_SED_SCRIPT) \
-e "s|[@]VERSION[@]|$(VERSION)|" \
-e "s|[@]GROFF_FONT_DIR[@]|$(fontdir)|" \
$(devpdf_srcdir)/util/BuildFoundries.pl \
>$(top_builddir)/font/devpdf/util/BuildFoundries; \
fi \
&& chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries
MOSTLYCLEANFILES += font/devpdf/DESC
font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
&& cat $(devpdf_srcdir)/DESC.in \
>$(top_builddir)/font/devpdf/DESC \
&& if test "$(PAGE)" = A4; then \
echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \
else \
echo "papersize letter" \
>>$(top_builddir)/font/devpdf/DESC; \
fi
font/devpdf/Foundry: $(devpdf_srcdir)/Foundry.in
$(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/
if HAVE_URW_FONTS
$(AM_V_GEN)sed "s|[@]urwfontsdir[@]|$(urwfontsdir)|" \
$(devpdf_srcdir)/Foundry.in >$@
else
$(AM_V_GEN)sed "/BEGIN URW/,/END URW/d" \
$(devpdf_srcdir)/Foundry.in >$@
endif
# This is kind of a cheat, but works because BuildFoundries produces so
# many artifacts.
$(DEFAULT_BASE35_FONTS) $(URW_BASE35_FONTS): font/devpdf/download
MOSTLYCLEANFILES += font/devpdf/download
font/devpdf/download: $(devpdffontmapdata) font/devpdf/DESC \
font/devpdf/Foundry font/devpdf/enc/text.enc \
font/devpdf/util/BuildFoundries
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
&& echo "# foundry ps-font-name ps-font-file" >$@.tmp \
&& echo "# A blank foundry is the default." >>$@.tmp \
&& PATH="$(abs_top_builddir)$(GROFF_PATH_SEPARATOR)$(abs_top_builddir)/build-aux$(GROFF_PATH_SEPARATOR)$(PATH)" \
$(abs_top_builddir)/font/devpdf/util/BuildFoundries \
--strict $(abs_top_builddir)/font/devpdf \
'$(abs_top_srcdir)/font/devps:$(abs_top_builddir)/font/devps' \
>>$@.tmp \
&& mv $@.tmp $@
# PDFs to be produced by troff should depend on this stamp file to
# ensure that gropdf's device and font description files are available.
MOSTLYCLEANFILES += font/devpdf/stamp
font/devpdf/stamp: font/devpdf/DESC font/devpdf/download \
$(devpdffontenc_DATA) $(devpdffontmap_DATA) $(devpdffont_DATA)
$(AM_V_at)>$@
mostlyclean-local: mostlyclean_devpdf_extra
mostlyclean_devpdf_extra:
@echo Cleaning font/devpdf
rm -rf $(top_builddir)/font/devpdf/enc \
$(top_builddir)/font/devpdf/map;
if test -d $(top_builddir)/font/devpdf; then \
for f in $(GROFF_FONT_FILES); do \
rm -f $(top_builddir)/font/devpdf/$$f; \
done; \
fi
install-data-local: install_devpdf
install_devpdf:
@echo Installing devpdf files
-@test -d $(DESTDIR)$(devpdffontdir) \
|| $(mkinstalldirs) $(DESTDIR)$(devpdffontdir)
@for f in $(GROFF_FONT_FILES); do \
$(RM) $(DESTDIR)$(devpdffontdir)/$$f; \
if test -f $$f; then \
$(INSTALL_DATA) $$f $(DESTDIR)$(devpdffontdir)/$$f; \
else \
$(INSTALL_DATA) $(top_builddir)/font/devpdf/$$f \
$(DESTDIR)$(devpdffontdir)/$$f; \
fi; \
done
$(INSTALL_DATA) $(top_builddir)/font/devpdf/download \
$(DESTDIR)$(devpdffontdir)/
uninstall_groffdirs: uninstall_devpdf
uninstall_devpdf:
@echo Uninstalling devpdf files
if test -d $(DESTDIR)$(devpdffontdir); then \
for f in $(GROFF_FONT_FILES); do \
rm -f $(DESTDIR)$(devpdffontdir)/$$f; \
done; \
if test -d $(DESTDIR)$(devpdffontencdir); then \
rmdir $(DESTDIR)$(devpdffontencdir); \
fi; \
if test -d $(DESTDIR)$(devpdffontmapdir); then \
rmdir $(DESTDIR)$(devpdffontmapdir); \
fi; \
rm -f $(DESTDIR)$(devpdffontdir)/download; \
rmdir $(DESTDIR)$(devpdffontdir); \
fi
font_devpdf_default_test=\
$(devpdf_srcdir)/tests/check-default-foundry.sh.in
font_devpdf_urw_test=$(devpdf_srcdir)/tests/check-urw-foundry.sh.in
font/devpdf/tests/check-default-foundry.sh: $(font_devpdf_default_test)
$(AM_V_GEN)$(MKDIR_P) `dirname $@` \
&& sed -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
$(font_devpdf_default_test) > $@ \
&& chmod +x $@
font/devpdf/tests/check-urw-foundry.sh: $(font_devpdf_urw_test)
$(AM_V_GEN)$(MKDIR_P) `dirname $@` \
&& sed -e "s|[@]urwfontsdir[@]|$(urwfontsdir)|g" \
$(font_devpdf_urw_test) > $@ \
&& chmod +x $@
font_devpdf_TESTS = \
font/devpdf/tests/check-default-foundry.sh \
font/devpdf/tests/check-urw-foundry.sh
TESTS += $(font_devpdf_TESTS)
MOSTLYCLEANFILES += $(font_devpdf_TESTS)
EXTRA_DIST += $(font_devpdf_default_test) $(font_devpdf_urw_test)
# Local Variables:
# mode: makefile-automake
# fill-column: 72
# End:
# vim: set autoindent filetype=automake textwidth=72:
|