forked from sdteffen/dia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardcopies.make
216 lines (177 loc) · 5.31 KB
/
hardcopies.make
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
211
212
213
214
215
##
## hardcopies.make
##
## HTML, PDF and Postcript documentation generation
## DO NOT MODIFY THIS FILE
##
## COPY doc/en/Makefile.am in your doc/[language] directory,
## then edit variables as needed
##
##
sysdoc = $(DESTDIR)$(docdir)/$(lang)
sysdoc_html = $(DESTDIR)$(htmldir)/html/$(lang)
sysdoc_pdf = $(DESTDIR)$(pdfdir)/$(lang)
sysdoc_ps = $(DESTDIR)$(psdir)/$(lang)
if WITH_HTMLDOC
htmldoc = $(progname)_html
html_install_data = install-data-html
html_install = install-html
html_install_ng = install-html-nognome
html_uninstall = uninstall-html
html_uninstall_ng = uninstall-html-nognome
html_clean = clean-html
endif
if WITH_JW
pdfdoc = $(progname).pdf
pdf_install = install-pdf
psdoc = $(progname).ps
ps_install = install-ps
endif
if WITH_PDFDOC
pdfdoc = $(progname).pdf
pdf_install = install-pdf
endif
if WITH_PSDOC
psdoc = $(progname).ps
ps_install = install-ps
endif
if HAVE_GNOME
all: omf $(htmldoc) $(pdfdoc) $(psdoc)
install-data-local: install-data-xml \
$(html_install) $(pdf_install) $(ps_install) install-examples
uninstall-local: uninstall-local-xml \
$(html_install) uninstall-pdf uninstall-ps uninstall-examples
clean-local: clean-local-xml \
clean-html clean-ps clean-pdf
else
if HAVE_XSLTPROC
all: $(htmldoc) $(pdfdoc) $(psdoc)
install-data-local: $(html_install_data) \
$(html_install_ng) $(pdf_install) $(ps_install) install-examples
uninstall-local: uninstall-local-html \
uninstall-html-nognome uninstall-pdf uninstall-ps uninstall-examples
else
all: $(htmldoc) $(pdfdoc) $(psdoc)
install-data-local: $(html_install) $(pdf_install) $(ps_install) install-examples
uninstall-local: uninstall-html uninstall-pdf uninstall-ps uninstall-examples
endif
clean-local: clean-local-xml \
clean-html clean-ps clean-pdf
endif
$(progname)_html: $(progname).xml $(xml_files) $(htmlstyle) $(pngfigures)
$(mkinstalldirs) $(srcdir)/$(progname)_html
$(mkinstalldirs) $(srcdir)/$(progname)_html/$(figdir)
$(mkinstalldirs) $(srcdir)/$(progname)_html/images
$(mkinstalldirs) $(srcdir)/$(progname)_html/images/callouts
$(mkinstalldirs) $(srcdir)/$(progname)_html/css
-cp ../html/images/*.png $(srcdir)/$(progname)_html/images
-cp ../html/images/callouts/*.png \
$(srcdir)/$(progname)_html/images/callouts
-cp ../html/css/*.css $(srcdir)/$(progname)_html/css
-cp $(srcdir)/$(figdir)/*.png $(srcdir)/$(progname)_html/$(figdir)
cd $(srcdir)/$(progname)_html \
&& xsltproc --stringparam graphic.default.extension png \
../$(htmlstyle) ../$<
touch $(progname)_html
if WITH_PDFDOC
$(progname).pdf: $(progname).xml $(xml_files) $(pngfigures)
-$(DBLATEX) -t pdf -T native \
-P 'latex.unicode.use=$(UNICODE)' \
-P latex.encoding='$(ENCODING)' \
$(LATEX_CLASS_OPTIONS) \
$<
endif
.epsfigures: $(epsfigures) $(pngfigures)
-if test -d "$(srcdir)/$(figdir)"; then \
for file in $(pngfigures) ; do \
destfile=$(srcdir)/$(figdir)/`basename $$file .png`.eps ; \
convert $$file $$destfile; \
done ; \
fi
-if test -d "$(srcdir)/ps/$(figdir)"; then \
for file in $(epsfigures) ; do \
cp $$file $(srcdir)/$(figdir)/ ; \
done ; \
fi
touch .epsfigures
if WITH_PSDOC
$(progname).ps: $(progname).xml $(xml_files) .epsfigures
-$(DBLATEX) -t ps -T native \
$(stylesheet) \
-P 'latex.unicode.use=$(UNICODE)' \
-P 'latex.encoding=$(ENCODING)' \
$(LATEX_CLASS_OPTIONS) \
$(srcdir)/$<
endif
if WITH_JW
.jw: $(progname).xml $(xml_files) .epsfigures
rm -rf jw
mkdir -p jw
cp -r graphics jw
cp *.xml jw
flip -b -u *.xml
cd jw && recode -d '$(DOCUMENT_ENCODING)..XML-standalone' *.xml
touch .jw
$(progname).ps: .jw
cd jw && $(JW) -b ps -V paper-type=$(PAPERSIZE) $(progname).xml
cp jw/$(progname).ps .
$(progname).pdf: .jw
cd jw && $(JW) -b pdf -V paper-type=$(PAPERSIZE) $(progname).xml
cp jw/$(progname).pdf .
endif
install-html: $(htmldoc)
$(mkinstalldirs) $(sysdoc_html)
cp -r $(srcdir)/$(progname)_html/* $(sysdoc_html)
uninstall-html:
-rm -f $(sysdoc_html)/*.html
-rm -f $(sysdoc_html)/$(figdir)/*.png
-rmdir $(sysdoc_html)/$(figdir)
-rm -f $(sysdoc_html)/images/callouts/*.png
-rmdir $(sysdoc_html)//images/callouts
-rm -f $(sysdoc_html)/images/*.png
-rmdir $(sysdoc_html)/images/
-rm -f $(sysdoc_html)/css/*.css
-rmdir $(sysdoc_html)/css
-rmdir $(sysdoc_html)
install-html-nognome:
$(mkinstalldirs) $(DESTDIR)$(htmldir)/html/
-(cd $(DESTDIR)$(htmldir)/html/ && ln -s $(helpdocdir) $(lang))
uninstall-html-nognome:
-rm $(DESTDIR)$(htmldir)/html/$(lang)
-rmdir $(DESTDIR)$(htmldir)/html/
clean-html:
-rm -rf $(srcdir)/$(progname)_html
install-pdf: $(pdfdoc)
$(mkinstalldirs) $(sysdoc_pdf)
-$(INSTALL_DATA) $< $(sysdoc_pdf)/$<
uninstall-pdf:
-rm -f $(sysdoc_pdf)/$(progname).pdf
clean-pdf:
rm -f $(progname).pdf
-rm -rf $(srcdir)/jw
rm -f .jw
install-ps: $(progname).ps
$(mkinstalldirs) $(sysdoc_ps)
-$(INSTALL_DATA) $< $(sysdoc_ps)/$<
uninstall-ps:
-rm -f $(sysdoc_ps)/$(progname).ps
clean-ps:
-rm -rf $(srcdir)/tex
-rm -f $(progname).ps
-rm -f .epsfigures
-rm -f $(srcdir)/graphics/*.eps
-rm -rf $(srcdir)/jw
rm -f .jw
install-examples: $(examples)
$(mkinstalldirs) $(sysdoc)/examples
for i in $^; do \
if test -f "$$i"; then \
echo "installing $$i" ;\
$(INSTALL_DATA) $$i $(sysdoc)/examples/$$(basename $$i) ; \
fi ; \
done
uninstall-examples: $(examples)
for i in $^; do \
rm -f $(sysdoc)/examples/$$(basename $$i) ;\
done
-rmdir $(sysdoc)/examples