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