]>
Commit | Line | Data |
---|---|---|
4312e020 BK |
1 | ## Makefile for the doc subdirectory of the GNU C++ Standard library. |
2 | ## | |
a945c346 | 3 | ## Copyright (C) 2008-2024 Free Software Foundation, Inc. |
4312e020 BK |
4 | ## |
5 | ## This file is part of the libstdc++ version 3 distribution. | |
6 | ## Process this file with automake to produce Makefile.in. | |
7 | ||
8 | ## This file is part of the GNU ISO C++ Library. This library is free | |
9 | ## software; you can redistribute it and/or modify it under the | |
10 | ## terms of the GNU General Public License as published by the | |
748086b7 | 11 | ## Free Software Foundation; either version 3, or (at your option) |
4312e020 BK |
12 | ## any later version. |
13 | ||
14 | ## This library is distributed in the hope that it will be useful, | |
15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ## GNU General Public License for more details. | |
18 | ||
19 | ## You should have received a copy of the GNU General Public License along | |
748086b7 JJ |
20 | ## with this library; see the file COPYING3. If not see |
21 | ## <http://www.gnu.org/licenses/>. | |
4312e020 BK |
22 | |
23 | include $(top_srcdir)/fragment.am | |
24 | ||
03a32789 BK |
25 | # Documentation Overview |
26 | # | |
6ba33b18 JW |
27 | # See ./xml/manual/documentation_hacking.xml for full details. |
28 | # | |
b25e6b79 | 29 | # There are two main input materials for libstdc++ documentation. |
5bca11c4 | 30 | # The first is the doxygen markup in libstdc++ sources, which is a |
b25e6b79 | 31 | # reference to the API. And the second is the manual, via docbook markup in |
5bca11c4 | 32 | # doc/xml/. |
7d8cafcd | 33 | # |
b25e6b79 BK |
34 | # A third and more obscure option deals with charting performance |
35 | # tests, and should be considered experimental. | |
36 | ||
37 | # Documentation conditionals for output. | |
38 | if BUILD_XML | |
39 | STAMP_XML = doc-xml | |
40 | STAMP_INSTALL_XML = doc-install-xml | |
41 | else | |
42 | STAMP_XML = | |
43 | STAMP_INSTALL_XML = | |
44 | endif | |
45 | ||
46 | if BUILD_HTML | |
47 | STAMP_HTML = doc-html | |
48 | STAMP_INSTALL_HTML = doc-install-html | |
49 | else | |
50 | STAMP_HTML = | |
51 | STAMP_INSTALL_HTML = | |
52 | endif | |
53 | ||
54 | if BUILD_MAN | |
55 | STAMP_MAN = doc-man | |
56 | STAMP_INSTALL_MAN = doc-install-man | |
57 | else | |
58 | STAMP_MAN = | |
59 | STAMP_INSTALL_MAN = | |
60 | endif | |
61 | ||
62 | if BUILD_PDF | |
63 | STAMP_PDF = doc-pdf | |
64 | STAMP_INSTALL_PDF = doc-install-pdf | |
65 | else | |
66 | STAMP_PDF = | |
67 | STAMP_INSTALL_PDF = | |
68 | endif | |
69 | ||
70 | if BUILD_EPUB | |
71 | STAMP_EPUB = doc-epub | |
72 | STAMP_INSTALL_EPUB = doc-install-epub | |
73 | else | |
74 | STAMP_EPUB = doc-epub | |
75 | STAMP_INSTALL_EPUB = doc-install-epub | |
76 | endif | |
77 | ||
78 | # Documentation primary rules. | |
5bca11c4 | 79 | # |
b25e6b79 BK |
80 | # xml: |
81 | # html: | |
82 | # pdf: | |
83 | # man: | |
84 | # info: | |
85 | # ps: | |
86 | # dvi: | |
87 | # epub: | |
88 | # install-xml: | |
89 | # install-html: | |
90 | # install-pdf: | |
91 | # install-man: | |
92 | # install-info: | |
93 | # install-ps: | |
94 | # install-dvi: | |
95 | # install-epub: | |
96 | ||
97 | xml: $(STAMP_XML) | |
98 | install-xml: $(STAMP_INSTALL_XML) | |
99 | ||
100 | html: $(STAMP_HTML) | |
101 | install-html: $(STAMP_INSTALL_HTML) | |
102 | ||
103 | man: $(STAMP_MAN) | |
104 | install-man: $(STAMP_INSTALL_MAN) | |
105 | ||
106 | pdf: $(STAMP_PDF) | |
107 | install-pdf: $(STAMP_INSTALL_PDF) | |
108 | ||
109 | epub: $(STAMP_EPUB) | |
110 | install-epub: $(STAMP_INSTALL_EPUB) | |
111 | ||
112 | info: | |
113 | install-info: | |
114 | ||
115 | ps: | |
116 | install-ps: | |
117 | ||
118 | dvi: | |
119 | install-dvi: | |
120 | ||
121 | ||
122 | # Default creation and installation rules. | |
123 | # Point to best sub-rule for the requested documentation target and | |
124 | # create, and then install toplevel directory with standardized names | |
5bca11c4 | 125 | # and layouts. |
03a32789 | 126 | |
b25e6b79 BK |
127 | # XML |
128 | xmldir="$(DESTDIR)@docdir@" | |
129 | stamp-xml: stamp-xml-single-docbook stamp-xml-single-doxygen | |
130 | $(STAMP) stamp-xml | |
131 | ||
132 | doc-xml: stamp-xml | |
133 | ||
134 | doc-install-xml: doc-xml | |
135 | test -z ${xmldir} || $(mkinstalldirs) ${xmldir} | |
136 | $(INSTALL_DATA) ${manual_xml} ${xmldir} | |
137 | $(INSTALL_DATA) ${api_xml} ${xmldir} | |
138 | ||
7d8cafcd | 139 | # HTML |
b25e6b79 | 140 | htmldir="$(DESTDIR)@docdir@" |
a6aff075 | 141 | stamp-html: stamp-html-docbook-data stamp-html-doxygen |
b25e6b79 | 142 | $(STAMP) stamp-html |
7d8cafcd | 143 | |
b25e6b79 BK |
144 | doc-html: stamp-html |
145 | ||
146 | doc-install-html: doc-html | |
147 | test -z ${htmldir} || $(mkinstalldirs) ${htmldir} | |
148 | cp -r ${docbook_outdir}/html ${htmldir}/libstdc++-manual.html; | |
149 | cp -r ${doxygen_outdir}/html ${htmldir}/libstdc++-api.html; | |
03a32789 BK |
150 | |
151 | ||
b25e6b79 BK |
152 | pdfdir="$(DESTDIR)@docdir@" |
153 | stamp-pdf: stamp-pdf-docbook stamp-pdf-doxygen | |
154 | $(STAMP) stamp-pdf | |
03a32789 | 155 | |
b25e6b79 | 156 | doc-pdf: stamp-pdf |
547f963b | 157 | |
b25e6b79 BK |
158 | doc-install-pdf: doc-pdf |
159 | test -z ${pdfdir} || $(mkinstalldirs) ${pdfdir} | |
160 | $(INSTALL_DATA) ${docbook_outdir}/pdf/libstdc++-manual.pdf ${pdfdir} | |
161 | $(INSTALL_DATA) ${doxygen_outdir}/pdf/libstdc++-api.pdf ${pdfdir} | |
162 | ||
163 | # MAN | |
164 | mandir="$(DESTDIR)@mandir@" | |
165 | stamp-man: stamp-man-doxygen | |
166 | $(STAMP) stamp-man | |
167 | ||
168 | doc-man: stamp-man | |
169 | ||
170 | doc-install-man: doc-man | |
171 | test -z ${mandir} || $(mkinstalldirs) ${mandir} | |
172 | cp -r ${doxygen_outdir}/man/man3 ${mandir} | |
173 | ||
174 | # TEXINFO,INFO | |
175 | infodir="$(DESTDIR)@infodir@" | |
176 | stamp-texinfo: stamp-texinfo-docbook | |
177 | $(STAMP) stamp-texinfo | |
178 | ||
179 | stamp-info: stamp-info-docbook | |
180 | $(STAMP) stamp-info | |
181 | ||
182 | doc-texinfo: stamp-texinfo | |
183 | ||
184 | doc-info: stamp-info | |
185 | ||
186 | doc-install-texinfo: doc-texinfo | |
187 | test -z ${infodir} || $(mkinstalldirs) ${infodir} | |
188 | $(INSTALL_DATA) ${manual_texi} ${infodir} | |
189 | ||
190 | doc-install-info: doc-info | |
191 | test -z ${infodir} || $(mkinstalldirs) ${infodir} | |
192 | $(INSTALL_DATA) ${manual_info} ${infodir} | |
193 | ||
194 | # EPUB | |
195 | # Assumes ruby installed | |
196 | epubdir="$(DESTDIR)@docdir@" | |
197 | stamp-epub: stamp-epub-docbook | |
198 | $(STAMP) stamp-epub | |
199 | ||
200 | doc-epub: stamp-epub | |
201 | ||
202 | doc-install-epub: doc-epub | |
203 | test -z ${epubdir} || $(mkinstalldirs) ${epubdir} | |
204 | $(INSTALL_DATA) ${manual_epub} ${epubdir} | |
7d8cafcd BK |
205 | |
206 | ||
8a165db0 | 207 | # Doxygen configuration |
0f752f44 | 208 | # Assumes doxygen, graphviz (with dot), pdflatex installed |
03a32789 BK |
209 | doxygen_script=${top_srcdir}/scripts/run_doxygen |
210 | doxygen_outdir = ${glibcxx_builddir}/doc/doxygen | |
81df260f | 211 | api_xml = ${doxygen_outdir}/xml/libstdc++-api.xml |
b25e6b79 BK |
212 | doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf |
213 | api_pdf = ${doxygen_outdir}/pdf/libstdc++-api.pdf | |
60f8b2e2 | 214 | |
b25e6b79 BK |
215 | ${doxygen_outdir}/xml: |
216 | mkdir -p ${doxygen_outdir}/xml | |
4312e020 | 217 | |
b25e6b79 BK |
218 | ${doxygen_outdir}/html: |
219 | mkdir -p ${doxygen_outdir}/html | |
4312e020 | 220 | |
b25e6b79 BK |
221 | ${doxygen_outdir}/latex: |
222 | mkdir -p ${doxygen_outdir}/latex | |
223 | ||
224 | ${doxygen_outdir}/pdf: | |
225 | mkdir -p ${doxygen_outdir}/pdf | |
226 | ||
227 | ${doxygen_outdir}/man: | |
228 | mkdir -p ${doxygen_outdir}/man | |
229 | ||
230 | stamp-xml-doxygen: ${doxygen_outdir}/xml | |
04d392e8 JW |
231 | -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
232 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
03a32789 | 233 | ${SHELL} ${doxygen_script} \ |
e3b6d3a8 | 234 | --host_alias=${host_alias} --mode=xml \ |
04d392e8 | 235 | "$${srcdir}" "$${builddir}" NO |
b25e6b79 | 236 | $(STAMP) stamp-xml-doxygen |
8a165db0 | 237 | |
b25e6b79 | 238 | stamp-xml-single-doxygen: stamp-xml-doxygen |
8a165db0 | 239 | @echo "Generating doxygen xml single file..." |
03a32789 | 240 | $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \ |
7d8cafcd | 241 | ${doxygen_outdir}/xml/index.xml > ${api_xml}; |
b25e6b79 BK |
242 | $(STAMP) stamp-xml-single-doxygen |
243 | ||
244 | stamp-html-doxygen: ${doxygen_outdir}/html | |
04d392e8 JW |
245 | -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
246 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
b25e6b79 | 247 | ${SHELL} ${doxygen_script} \ |
e3b6d3a8 | 248 | --host_alias=${host_alias} --mode=html \ |
04d392e8 | 249 | "$${srcdir}" "$${builddir}" YES |
b25e6b79 | 250 | $(STAMP) stamp-html-doxygen |
4312e020 | 251 | |
b25e6b79 | 252 | stamp-latex-doxygen: ${doxygen_outdir}/latex |
04d392e8 JW |
253 | -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
254 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
0f752f44 | 255 | ${SHELL} ${doxygen_script} \ |
e3b6d3a8 | 256 | --host_alias=${host_alias} --mode=latex --latex_cmd=$(LATEX_CMD) \ |
04d392e8 | 257 | "$${srcdir}" "$${builddir}" NO |
b25e6b79 | 258 | $(STAMP) stamp-latex-doxygen |
0f752f44 | 259 | |
5ab3a5af BK |
260 | # Chance of loooooonnggg creation time on this rule. Iff this fails, |
261 | # look at refman.log and see if TeX's memory is exhausted. Symptoms | |
262 | # include asking a wizard to enlarge capacity. If this is the case, | |
263 | # find texmf.cnf and add a zero for pool_size, string_vacancies, | |
e3b6d3a8 JW |
264 | # max_strings, and pool_free values. A much simpler workaround is to |
265 | # install lualatex and set LATEX_CMD=lualatex when running make. | |
5ea37bca | 266 | # Errors like "File `foo.sty' not found" mean a TeX package is missing. |
b25e6b79 | 267 | stamp-pdf-doxygen: stamp-latex-doxygen ${doxygen_outdir}/pdf |
43a35b26 | 268 | @echo "Generating doxygen pdf file..."; |
e3b6d3a8 | 269 | -$(MAKE) -C ${doxygen_outdir}/latex -i pdf |
43a35b26 | 270 | @if [ -f ${doxygen_pdf} ]; then \ |
5ab3a5af BK |
271 | mv ${doxygen_pdf} ${api_pdf} ; \ |
272 | echo ":: PDF file is ${api_pdf}"; \ | |
0f752f44 BK |
273 | else \ |
274 | echo "... error"; \ | |
5ea37bca | 275 | grep -F 'LaTeX Error' ${doxygen_outdir}/latex/refman.log; \ |
be8d5f99 | 276 | grep -F 'TeX capacity exceeded, sorry' ${doxygen_outdir}/latex/refman.log; \ |
0f752f44 BK |
277 | exit 12; \ |
278 | fi | |
60f8b2e2 BK |
279 | $(STAMP) stamp-pdf-doxygen |
280 | ||
b25e6b79 | 281 | stamp-man-doxygen: ${doxygen_outdir}/man |
04d392e8 JW |
282 | -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
283 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
b25e6b79 | 284 | ${SHELL} ${doxygen_script} \ |
e3b6d3a8 | 285 | --host_alias=${host_alias} --mode=man \ |
04d392e8 | 286 | "$${srcdir}" "$${builddir}" YES |
b25e6b79 BK |
287 | $(STAMP) stamp-man-doxygen |
288 | ||
289 | doc-xml-doxygen: stamp-xml-doxygen | |
290 | doc-xml-single-doxygen: stamp-xml-single-doxygen | |
291 | doc-html-doxygen: stamp-html-doxygen | |
292 | doc-latex-doxygen: stamp-latex-doxygen | |
293 | doc-pdf-doxygen: stamp-pdf-doxygen | |
294 | doc-man-doxygen: stamp-man-doxygen | |
0f752f44 | 295 | |
8a165db0 BK |
296 | |
297 | # Docbook configuration. | |
298 | # Assumes | |
299 | # libxslt | |
0f752f44 BK |
300 | # dblatex |
301 | # pdflatex | |
8a165db0 | 302 | # docbook-style-xsl |
0f752f44 | 303 | # emacs-nxml-mode |
03a32789 | 304 | docbook_outdir = ${glibcxx_builddir}/doc/docbook |
0f752f44 BK |
305 | xml_dir = ${glibcxx_srcdir}/doc/xml |
306 | ||
307 | xml_sources_basic = \ | |
308 | ${xml_dir}/spine.xml \ | |
309 | ${xml_dir}/authors.xml \ | |
310 | ${xml_dir}/api.xml \ | |
311 | ${xml_dir}/faq.xml | |
312 | ||
313 | xml_sources_manual = \ | |
314 | ${xml_dir}/manual/abi.xml \ | |
315 | ${xml_dir}/manual/algorithms.xml \ | |
316 | ${xml_dir}/manual/allocator.xml \ | |
317 | ${xml_dir}/manual/auto_ptr.xml \ | |
318 | ${xml_dir}/manual/atomics.xml \ | |
319 | ${xml_dir}/manual/backwards_compatibility.xml \ | |
320 | ${xml_dir}/manual/bitmap_allocator.xml \ | |
321 | ${xml_dir}/manual/build_hacking.xml \ | |
322 | ${xml_dir}/manual/codecvt.xml \ | |
323 | ${xml_dir}/manual/concurrency.xml \ | |
324 | ${xml_dir}/manual/concurrency_extensions.xml \ | |
325 | ${xml_dir}/manual/configure.xml \ | |
326 | ${xml_dir}/manual/containers.xml \ | |
327 | ${xml_dir}/manual/ctype.xml \ | |
328 | ${xml_dir}/manual/debug_mode.xml \ | |
329 | ${xml_dir}/manual/debug.xml \ | |
330 | ${xml_dir}/manual/diagnostics.xml \ | |
d2b0caaa | 331 | ${xml_dir}/manual/documentation_hacking.xml \ |
0f752f44 BK |
332 | ${xml_dir}/manual/evolution.xml \ |
333 | ${xml_dir}/manual/extensions.xml \ | |
334 | ${xml_dir}/manual/internals.xml \ | |
335 | ${xml_dir}/manual/intro.xml \ | |
336 | ${xml_dir}/manual/io.xml \ | |
337 | ${xml_dir}/manual/iterators.xml \ | |
338 | ${xml_dir}/manual/locale.xml \ | |
339 | ${xml_dir}/manual/localization.xml \ | |
340 | ${xml_dir}/manual/messages.xml \ | |
341 | ${xml_dir}/manual/mt_allocator.xml \ | |
342 | ${xml_dir}/manual/numerics.xml \ | |
343 | ${xml_dir}/manual/parallel_mode.xml \ | |
ce1140e3 | 344 | ${xml_dir}/manual/policy_data_structures.xml \ |
74080cba | 345 | ${xml_dir}/manual/policy_data_structures_biblio.xml \ |
0f752f44 | 346 | ${xml_dir}/manual/prerequisites.xml \ |
0f752f44 BK |
347 | ${xml_dir}/manual/shared_ptr.xml \ |
348 | ${xml_dir}/manual/spine.xml \ | |
349 | ${xml_dir}/manual/status_cxx1998.xml \ | |
f25481f4 | 350 | ${xml_dir}/manual/status_cxx2011.xml \ |
109a3af4 | 351 | ${xml_dir}/manual/status_cxx2014.xml \ |
57ede05c JW |
352 | ${xml_dir}/manual/status_cxx2017.xml \ |
353 | ${xml_dir}/manual/status_cxx2020.xml \ | |
0f752f44 BK |
354 | ${xml_dir}/manual/status_cxxtr1.xml \ |
355 | ${xml_dir}/manual/status_cxxtr24733.xml \ | |
356 | ${xml_dir}/manual/strings.xml \ | |
357 | ${xml_dir}/manual/support.xml \ | |
358 | ${xml_dir}/manual/test.xml \ | |
ce1140e3 | 359 | ${xml_dir}/manual/test_policy_data_structures.xml \ |
0f752f44 BK |
360 | ${xml_dir}/manual/using.xml \ |
361 | ${xml_dir}/manual/using_exceptions.xml \ | |
362 | ${xml_dir}/manual/utilities.xml \ | |
363 | ${xml_dir}/manual/appendix_free.xml \ | |
364 | ${xml_dir}/manual/appendix_contributing.xml \ | |
365 | ${xml_dir}/manual/appendix_porting.xml | |
8a165db0 BK |
366 | |
367 | xml_sources_extra = \ | |
669b5857 | 368 | ${xml_dir}/gnu/fdl-1.3.xml \ |
60f8b2e2 | 369 | ${xml_dir}/gnu/gpl-3.0.xml |
0f752f44 BK |
370 | |
371 | xml_sources = \ | |
372 | ${xml_sources_basic} \ | |
373 | ${xml_sources_manual} \ | |
374 | ${xml_sources_extra} | |
8a165db0 | 375 | |
154c4a08 BK |
376 | xml_image_dir = ${xml_dir}/images |
377 | xml_image_basic = \ | |
378 | ${xml_image_dir}/confdeps.png \ | |
379 | ${xml_image_dir}/pbds_balls_and_bins.png \ | |
380 | ${xml_image_dir}/pbds_container_tag_hierarchy.png \ | |
381 | ${xml_image_dir}/pbds_different_underlying_dss_1.png \ | |
382 | ${xml_image_dir}/pbds_different_underlying_dss_2.png \ | |
383 | ${xml_image_dir}/pbds_embedded_lists_1.png \ | |
384 | ${xml_image_dir}/pbds_embedded_lists_2.png \ | |
385 | ${xml_image_dir}/pbds_embedded_lists_3.png \ | |
386 | ${xml_image_dir}/pbds_exception_hierarchy.png \ | |
387 | ${xml_image_dir}/pbds_hash_policy_cd.png \ | |
388 | ${xml_image_dir}/pbds_hash_ranged_hash_range_hashing_fns.png \ | |
389 | ${xml_image_dir}/pbds_hash_range_hashing_seq_diagram2.png \ | |
390 | ${xml_image_dir}/pbds_hash_range_hashing_seq_diagram.png \ | |
391 | ${xml_image_dir}/pbds_insert_resize_sequence_diagram1.png \ | |
392 | ${xml_image_dir}/pbds_insert_resize_sequence_diagram2.png \ | |
393 | ${xml_image_dir}/pbds_insert_resize_sequence_diagram3.png \ | |
394 | ${xml_image_dir}/pbds_invalidation_guarantee_erase.png \ | |
395 | ${xml_image_dir}/pbds_invalidation_tag_hierarchy.png \ | |
396 | ${xml_image_dir}/pbds_list_update.png \ | |
397 | ${xml_image_dir}/pbds_node_invariants.png \ | |
398 | ${xml_image_dir}/pbds_pat_trie.png \ | |
399 | ${xml_image_dir}/pbds_point_iterator_hierarchy.png \ | |
400 | ${xml_image_dir}/pbds_point_iterators_range_ops_1.png \ | |
401 | ${xml_image_dir}/pbds_point_iterators_range_ops_2.png \ | |
402 | ${xml_image_dir}/pbds_priority_queue_different_underlying_dss.png \ | |
403 | ${xml_image_dir}/pbds_priority_queue_tag_hierarchy.png \ | |
404 | ${xml_image_dir}/pbds_rationale_null_node_updator.png \ | |
405 | ${xml_image_dir}/pbds_resize_policy_cd.png \ | |
406 | ${xml_image_dir}/pbds_restoring_node_invariants.png \ | |
407 | ${xml_image_dir}/pbds_simple_list.png \ | |
408 | ${xml_image_dir}/pbds_tree_node_invalidations.png \ | |
409 | ${xml_image_dir}/pbds_tree_node_invariants.png \ | |
410 | ${xml_image_dir}/pbds_tree_node_updator_policy_cd.png \ | |
411 | ${xml_image_dir}/pbds_trie_node_updator_policy_cd.png \ | |
696d4bc1 | 412 | ${xml_image_dir}/pbds_update_seq_diagram.png |
154c4a08 BK |
413 | |
414 | xml_image_generated = \ | |
415 | ${xml_image_dir}/pbds_binary_priority_queue_int_push_pop.png \ | |
416 | ${xml_image_dir}/pbds_binary_priority_queue_int_push.png \ | |
417 | ${xml_image_dir}/pbds_ccgp_hash_int_subscript_insert.png \ | |
418 | ${xml_image_dir}/pbds_cc_hash_int_find.png \ | |
419 | ${xml_image_dir}/pbds_cc_hash_int_subscript_find.png \ | |
420 | ${xml_image_dir}/pbds_cc_hash_int_subscript_insert.png \ | |
421 | ${xml_image_dir}/pbds_gp_hash_int_find.png \ | |
422 | ${xml_image_dir}/pbds_gp_hash_int_subscript_find.png \ | |
423 | ${xml_image_dir}/pbds_gp_hash_int_subscript_insert.png \ | |
424 | ${xml_image_dir}/pbds_hash_int_erase_mem.png \ | |
425 | ${xml_image_dir}/pbds_hash_text_find.png \ | |
426 | ${xml_image_dir}/pbds_hash_zlob_int_find.png \ | |
427 | ${xml_image_dir}/pbds_multimap_text_find_large_s2p_hash.png \ | |
428 | ${xml_image_dir}/pbds_multimap_text_find_large_s2p_tree.png \ | |
429 | ${xml_image_dir}/pbds_multimap_text_find_small_s2p_hash.png \ | |
430 | ${xml_image_dir}/pbds_multimap_text_find_small_s2p_tree.png \ | |
431 | ${xml_image_dir}/pbds_multimap_text_insert_large_s2p_hash.png \ | |
432 | ${xml_image_dir}/pbds_multimap_text_insert_large_s2p_tree.png \ | |
433 | ${xml_image_dir}/pbds_multimap_text_insert_mem_large_s2p_hash.png \ | |
434 | ${xml_image_dir}/pbds_multimap_text_insert_mem_large_s2p_tree.png \ | |
435 | ${xml_image_dir}/pbds_multimap_text_insert_mem_small_s2p_hash.png \ | |
436 | ${xml_image_dir}/pbds_multimap_text_insert_mem_small_s2p_tree.png \ | |
437 | ${xml_image_dir}/pbds_multimap_text_insert_small_s2p_hash.png \ | |
438 | ${xml_image_dir}/pbds_multimap_text_insert_small_s2p_tree.png \ | |
439 | ${xml_image_dir}/pbds_pairing_priority_queue_text_modify_down_thin.png \ | |
440 | ${xml_image_dir}/pbds_pairing_priority_queue_text_modify_up_thin.png \ | |
441 | ${xml_image_dir}/pbds_pairing_priority_queue_text_push_pop.png \ | |
442 | ${xml_image_dir}/pbds_pairing_priority_queue_text_push.png \ | |
443 | ${xml_image_dir}/pbds_priority_queue_int_push_pop.png \ | |
444 | ${xml_image_dir}/pbds_priority_queue_int_push.png \ | |
445 | ${xml_image_dir}/pbds_priority_queue_text_join.png \ | |
446 | ${xml_image_dir}/pbds_priority_queue_text_modify_down.png \ | |
447 | ${xml_image_dir}/pbds_priority_queue_text_modify_up.png \ | |
448 | ${xml_image_dir}/pbds_priority_queue_text_pop_mem.png \ | |
449 | ${xml_image_dir}/pbds_priority_queue_text_push_pop.png \ | |
450 | ${xml_image_dir}/pbds_priority_queue_text_push.png \ | |
451 | ${xml_image_dir}/pbds_tree_int_find.png \ | |
452 | ${xml_image_dir}/pbds_tree_order_statistics.png \ | |
453 | ${xml_image_dir}/pbds_tree_split_join.png \ | |
454 | ${xml_image_dir}/pbds_tree_text_find.png \ | |
455 | ${xml_image_dir}/pbds_tree_text_insert_node.png \ | |
456 | ${xml_image_dir}/pbds_tree_text_insert_trie.png \ | |
457 | ${xml_image_dir}/pbds_tree_text_insert_vector.png \ | |
458 | ${xml_image_dir}/pbds_tree_text_lor_find.png | |
459 | ||
460 | xml_images = ${xml_image_basic} ${xml_image_generated} | |
a6aff075 | 461 | |
8a165db0 | 462 | xml_noinst = \ |
0f752f44 BK |
463 | ${xml_dir}/book.txml \ |
464 | ${xml_dir}/chapter.txml \ | |
d2b0caaa | 465 | ${xml_dir}/class.txml \ |
154c4a08 BK |
466 | ${xml_image_dir}/confdeps.dot \ |
467 | ${xml_image_dir}/confdeps.pdf | |
8a165db0 BK |
468 | |
469 | XSLTPROC = xsltproc | |
ce1140e3 | 470 | XSLT_FLAGS = --nonet --xinclude |
109a3af4 | 471 | XSLT_PARAM = --param toc.section.depth 4 --param generate.consistent.ids 1 |
b329dd10 BK |
472 | #XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns |
473 | #XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets | |
8a165db0 | 474 | XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl |
27f36b78 | 475 | XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl |
8d24c975 | 476 | XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl |
43fe49ec | 477 | XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl |
8d24c975 | 478 | XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl |
b25e6b79 BK |
479 | |
480 | ${docbook_outdir}/epub: | |
481 | mkdir -p ${docbook_outdir}/epub | |
43fe49ec | 482 | mkdir -p ${docbook_outdir}/epub/OEBPS/images |
8a165db0 | 483 | |
547f963b BK |
484 | ${docbook_outdir}/fo: |
485 | mkdir -p ${docbook_outdir}/fo | |
486 | ||
03a32789 BK |
487 | ${docbook_outdir}/html: |
488 | mkdir -p ${docbook_outdir}/html | |
a6aff075 | 489 | mkdir -p ${docbook_outdir}/html/images |
5e3a0ed1 | 490 | mkdir -p ${docbook_outdir}/html/manual |
8a165db0 | 491 | |
03a32789 BK |
492 | ${docbook_outdir}/pdf: |
493 | mkdir -p ${docbook_outdir}/pdf | |
8a165db0 | 494 | |
74080cba BK |
495 | ${docbook_outdir}/latex: |
496 | mkdir -p ${docbook_outdir}/latex | |
497 | ||
547f963b BK |
498 | ${docbook_outdir}/texinfo: |
499 | mkdir -p ${docbook_outdir}/texinfo | |
8a165db0 | 500 | |
03a32789 BK |
501 | ${docbook_outdir}/xml: |
502 | mkdir -p ${docbook_outdir}/xml | |
8a165db0 | 503 | |
8a165db0 | 504 | |
547f963b BK |
505 | # XML, all one page |
506 | # Some info on canonicalization | |
507 | # http://www.mail-archive.com/help-texinfo@gnu.org/msg00864.html | |
81df260f BK |
508 | manual_xml = ${docbook_outdir}/xml/libstdc++-manual.xml |
509 | set_xml = ${docbook_outdir}/xml/libstdc++-set.xml | |
b25e6b79 | 510 | stamp-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml |
8a165db0 | 511 | @echo "Generating XML single..." |
b25e6b79 BK |
512 | $(XMLLINT) $(XMLLINT_FLAGS) \ |
513 | ${top_srcdir}/doc/xml/manual/spine.xml > ${manual_xml}; | |
514 | $(XMLLINT) $(XMLLINT_FLAGS) \ | |
515 | ${top_srcdir}/doc/xml/spine.xml > ${set_xml}; | |
b25e6b79 BK |
516 | $(STAMP) stamp-xml-single-docbook |
517 | ||
518 | doc-xml-single-docbook: stamp-xml-single-docbook | |
8a165db0 | 519 | |
74080cba BK |
520 | # Validate existing XML structure. |
521 | XMLLINT = xmllint | |
522 | LINT_FLAGS = --debug --xinclude --noent --noblanks --noout | |
523 | SCHEMA_FLAGS = --dtdvalid http://www.docbook.org/xml/5.0/dtd/docbook.dtd | |
524 | SCHEMA_RNG_FLAGS = --relaxng http://www.docbook.org/xml/5.0/rng/docbook.rng | |
525 | #SCHEMA_FLAGS = --nonet --dtdvalid /usr/share/xxx/dtd/5.0/docbook.dtd | |
526 | XMLLINT_VALID_FLAGS = $(LINT_FLAGS) $(SCHEMA_FLAGS) | |
527 | XMLLINT_FLAGS = --xinclude --nsclean --c14n --noent --noblanks --nocdata | |
528 | doc-xml-validate-docbook: doc-xml-validate-dtd-db | |
529 | ||
530 | doc-xml-validate-dtd-db: $(xml_sources) $(xml_images) | |
531 | @echo "Generating XML validation log..." | |
532 | $(XMLLINT) $(XMLLINT_VALID_FLAGS) ${top_srcdir}/doc/xml/spine.xml | |
533 | ||
534 | doc-xml-validate-rng-db: $(xml_sources) $(xml_images) doc-xml-single-docbook | |
535 | @echo "Generating XML RelaxNG validation log..." | |
536 | $(XMLLINT) $(LINT_FLAGS) $(SCHEMA_RNG_FLAGS) ${set_xml} | |
537 | ||
a6aff075 BK |
538 | # HTML support files |
539 | stamp-html-docbook-images: stamp-html-docbook $(xml_images) | |
540 | $(INSTALL_DATA) $(xml_images) ${docbook_outdir}/html/images | |
541 | $(STAMP) stamp-html-docbook-images | |
542 | ||
ca314fbd | 543 | stamp-html-docbook-data: stamp-html-docbook-images |
a6aff075 BK |
544 | $(STAMP) stamp-html-docbook-data |
545 | ||
8d24c975 | 546 | # HTML, "chunked" into index plus chapters as separate pages |
b25e6b79 | 547 | stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html |
8a165db0 | 548 | @echo "Generating html files..." |
ce1140e3 | 549 | $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${docbook_outdir}/html/ \ |
8d24c975 BK |
550 | --stringparam chunker.output.encoding UTF-8 \ |
551 | $(XSL_HTML_STYLE) \ | |
552 | ${top_srcdir}/doc/xml/spine.xml | |
b25e6b79 BK |
553 | $(STAMP) stamp-html-docbook |
554 | ||
a6aff075 | 555 | doc-html-docbook: stamp-html-docbook-data |
8a165db0 | 556 | |
07f37a7f JW |
557 | # Generate the HTML pages and copy them back to the source tree. |
558 | doc-html-docbook-regenerate: doc-html-docbook | |
559 | $(INSTALL_DATA) ${docbook_outdir}/html/*.html ${top_srcdir}/doc/html | |
560 | $(INSTALL_DATA) ${docbook_outdir}/html/images/* ${top_srcdir}/doc/html/images | |
561 | $(INSTALL_DATA) ${docbook_outdir}/html/manual/*.html ${top_srcdir}/doc/html/manual | |
562 | ||
8a165db0 | 563 | # HTML, all one page |
8d24c975 | 564 | # NB: Have to generate customization XSL for UTF-8 output. |
5bca11c4 | 565 | manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html |
b25e6b79 | 566 | stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html |
8a165db0 | 567 | @echo "Generating html single file..." |
ce1140e3 | 568 | $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \ |
8d24c975 BK |
569 | ${XSL_LOCAL_STYLE} \ |
570 | ${top_srcdir}/doc/xml/spine.xml | |
b25e6b79 BK |
571 | $(STAMP) stamp-html-single-docbook |
572 | ||
573 | doc-html-single-docbook: stamp-html-single-docbook | |
8a165db0 BK |
574 | |
575 | # FO | |
b25e6b79 | 576 | stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo |
8a165db0 | 577 | @echo "Generating FO files..." |
ce1140e3 | 578 | $(XSLTPROC) $(XSLT_FLAGS) -o ${docbook_outdir}/fo/spine.fo \ |
8a165db0 | 579 | $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml |
b25e6b79 BK |
580 | $(STAMP) stamp-fo-docbook |
581 | ||
582 | doc-fo-docbook: stamp-fo-docbook | |
8a165db0 | 583 | |
5bca11c4 BK |
584 | # PDF, via dblatex |
585 | manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf | |
74080cba BK |
586 | DBLATEX_FLAGS = --verbose --pdf --dump --debug --tmpdir=${docbook_outdir}/latex |
587 | ||
588 | doc-pdf-docbook-dirs: ${docbook_outdir}/pdf ${docbook_outdir}/latex | |
589 | ||
590 | doc-pdf-docbook-pre: $(xml_sources) doc-pdf-docbook-dirs | |
591 | ||
592 | stamp-pdf-docbook: doc-pdf-docbook-pre doc-xml-single-docbook | |
40e053e3 | 593 | @echo "Generating pdf dblatex files..." |
74080cba BK |
594 | dblatex $(DBLATEX_FLAGS) -o ${manual_pdf} \ |
595 | ${top_srcdir}/doc/xml/spine.xml | |
b25e6b79 BK |
596 | $(STAMP) stamp-pdf-docbook |
597 | ||
598 | doc-pdf-docbook: stamp-pdf-docbook | |
40e053e3 | 599 | |
b25e6b79 | 600 | # TEXINFO, via docbook2X |
09c2815d | 601 | # NB: Both experimental and temperamental |
b25e6b79 BK |
602 | manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi |
603 | manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info | |
547f963b BK |
604 | DB2TEXI_FLAGS = \ |
605 | --encoding=utf-8//TRANSLIT \ | |
606 | --string-param output-file="libstdc++-manual" \ | |
607 | --string-param directory-category="GNU C++ Library" \ | |
7d8cafcd | 608 | --string-param explicit-node-names=true |
b25e6b79 BK |
609 | |
610 | stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo | |
547f963b | 611 | @echo "Generating texinfo files..." |
b25e6b79 BK |
612 | db2x_docbook2texi $(DB2TEXI_FLAGS) ${set_xml} |
613 | mv libstdc++-manual.texi ${manual_texi} | |
614 | $(STAMP) stamp-texinfo-docbook | |
615 | ||
616 | stamp-info-docbook: stamp-texinfo-docbook | |
617 | @echo "Generating info files..." | |
09c2815d | 618 | $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info} |
b25e6b79 BK |
619 | $(STAMP) stamp-info-docbook |
620 | ||
621 | doc-texinfo-docbook: stamp-texinfo-docbook | |
622 | ||
623 | doc-info-docbook: stamp-info-docbook | |
624 | ||
43fe49ec BK |
625 | # EPUB version 3 |
626 | # http://sourceforge.net/projects/docbook/files/epub3/ | |
627 | # Can verify document with epubcheck | |
b25e6b79 BK |
628 | manual_epub = ${docbook_outdir}/epub/libstdc++-manual.epub |
629 | stamp-epub-docbook: stamp-xml-single-docbook ${docbook_outdir}/epub | |
630 | @echo "Generating epub files..." | |
696d4bc1 BK |
631 | if [ ! -d "${docbook_outdir}/images" ]; then \ |
632 | $(LN_S) ${top_srcdir}/doc/xml/images ${docbook_outdir}/; \ | |
633 | fi | |
43fe49ec BK |
634 | $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) \ |
635 | --stringparam base.dir "${docbook_outdir}/epub/OEBPS/" \ | |
636 | $(XSL_EPUB_STYLE) ${top_srcdir}/doc/xml/spine.xml | |
637 | $(INSTALL_DATA) $(xml_images) ${docbook_outdir}/epub/OEBPS/images | |
638 | zip -X0 ${manual_epub} ${docbook_outdir}/epub/mimetype | |
639 | zip -r -X9 ${manual_epub} ${docbook_outdir}/epub/META-INF ${docbook_outdir}/epub/OEBPS | |
b25e6b79 BK |
640 | $(STAMP) stamp-epub-docbook |
641 | ||
642 | doc-epub-docbook: stamp-epub-docbook | |
547f963b | 643 | |
03a32789 BK |
644 | # Performance doc and graph configuration. |
645 | # Assumes pychart, beautiful soup installed. | |
154c4a08 BK |
646 | # Generates the plots/graph imagery for performance testing. |
647 | doc_performance_script=${top_srcdir}/scripts/make_graph.py | |
648 | doc-svg-performance: ${docbook_outdir}/xml | |
03a32789 | 649 | -@(chmod + ${doc_performance_script}; \ |
154c4a08 BK |
650 | ${doc_performance_script} \ |
651 | ${top_srcdir}/testsuite/data/make_graph_test_infos.xml \ | |
03a32789 | 652 | ${glibcxx_builddir}/testsuite \ |
154c4a08 | 653 | ${glibcxx_builddir}/doc/docbook/xml/images) |
60f8b2e2 | 654 | |
c4e82de9 | 655 | .PHONY: doc-doxygen-html doc-doxygen-man doc-performance |
4312e020 BK |
656 | |
657 | # By adding these files here, automake will remove them for 'make clean' | |
b25e6b79 | 658 | CLEANFILES = *.log stamp* |
4312e020 BK |
659 | |
660 | # To remove directories. | |
661 | clean-local: | |
b25e6b79 | 662 | rm -rf man html pdf fo xml doxygen docbook ./libstdc++-* db2t* |