]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/doc/Makefile.am
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / doc / Makefile.am
CommitLineData
4312e020
BK
1## Makefile for the doc subdirectory of the GNU C++ Standard library.
2##
5624e564 3## Copyright (C) 2008-2015 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
23include $(top_srcdir)/fragment.am
24
03a32789
BK
25# Documentation Overview
26#
b25e6b79 27# There are two main input materials for libstdc++ documentation.
5bca11c4 28# The first is the doxygen markup in libstdc++ sources, which is a
b25e6b79 29# reference to the API. And the second is the manual, via docbook markup in
5bca11c4 30# doc/xml/.
7d8cafcd 31#
b25e6b79
BK
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.
5bca11c4 77#
b25e6b79
BK
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
5bca11c4 123# and layouts.
03a32789 124
b25e6b79
BK
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
7d8cafcd 137# HTML
b25e6b79 138htmldir="$(DESTDIR)@docdir@"
a6aff075 139stamp-html: stamp-html-docbook-data stamp-html-doxygen
b25e6b79 140 $(STAMP) stamp-html
7d8cafcd 141
b25e6b79
BK
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;
03a32789
BK
148
149# PDF
b25e6b79
BK
150pdfdir="$(DESTDIR)@docdir@"
151stamp-pdf: stamp-pdf-docbook stamp-pdf-doxygen
152 $(STAMP) stamp-pdf
03a32789 153
b25e6b79 154doc-pdf: stamp-pdf
547f963b 155
b25e6b79
BK
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}
7d8cafcd
BK
203
204
8a165db0 205# Doxygen configuration
0f752f44 206# Assumes doxygen, graphviz (with dot), pdflatex installed
03a32789
BK
207doxygen_script=${top_srcdir}/scripts/run_doxygen
208doxygen_outdir = ${glibcxx_builddir}/doc/doxygen
81df260f 209api_xml = ${doxygen_outdir}/xml/libstdc++-api.xml
b25e6b79
BK
210doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf
211api_pdf = ${doxygen_outdir}/pdf/libstdc++-api.pdf
60f8b2e2 212
b25e6b79
BK
213${doxygen_outdir}/xml:
214 mkdir -p ${doxygen_outdir}/xml
4312e020 215
b25e6b79
BK
216${doxygen_outdir}/html:
217 mkdir -p ${doxygen_outdir}/html
4312e020 218
b25e6b79
BK
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
8a165db0
BK
229 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
230 builddir=`cd ..; ${PWD_COMMAND}`; \
03a32789 231 ${SHELL} ${doxygen_script} \
40e053e3 232 --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
b25e6b79 233 $(STAMP) stamp-xml-doxygen
8a165db0 234
b25e6b79 235stamp-xml-single-doxygen: stamp-xml-doxygen
8a165db0 236 @echo "Generating doxygen xml single file..."
03a32789 237 $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \
7d8cafcd 238 ${doxygen_outdir}/xml/index.xml > ${api_xml};
b25e6b79
BK
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
4312e020 247
b25e6b79 248stamp-latex-doxygen: ${doxygen_outdir}/latex
0f752f44
BK
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)
b25e6b79 253 $(STAMP) stamp-latex-doxygen
0f752f44 254
5ab3a5af
BK
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.
b25e6b79 260stamp-pdf-doxygen: stamp-latex-doxygen ${doxygen_outdir}/pdf
0f752f44
BK
261 -(cd ${doxygen_outdir}/latex && $(MAKE) -i pdf;)
262 echo "Generating doxygen pdf file...";
263 if [ -f ${doxygen_pdf} ]; then \
5ab3a5af
BK
264 mv ${doxygen_pdf} ${api_pdf} ; \
265 echo ":: PDF file is ${api_pdf}"; \
0f752f44
BK
266 else \
267 echo "... error"; \
268 exit 12; \
269 fi
60f8b2e2
BK
270 $(STAMP) stamp-pdf-doxygen
271
b25e6b79
BK
272stamp-man-doxygen: ${doxygen_outdir}/man
273 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
274 builddir=`cd ..; ${PWD_COMMAND}`; \
275 ${SHELL} ${doxygen_script} \
276 --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
277 $(STAMP) stamp-man-doxygen
278
279doc-xml-doxygen: stamp-xml-doxygen
280doc-xml-single-doxygen: stamp-xml-single-doxygen
281doc-html-doxygen: stamp-html-doxygen
282doc-latex-doxygen: stamp-latex-doxygen
283doc-pdf-doxygen: stamp-pdf-doxygen
284doc-man-doxygen: stamp-man-doxygen
0f752f44 285
8a165db0
BK
286
287# Docbook configuration.
288# Assumes
289# libxslt
0f752f44
BK
290# dblatex
291# pdflatex
8a165db0 292# docbook-style-xsl
0f752f44 293# emacs-nxml-mode
03a32789 294docbook_outdir = ${glibcxx_builddir}/doc/docbook
0f752f44
BK
295xml_dir = ${glibcxx_srcdir}/doc/xml
296
297xml_sources_basic = \
298 ${xml_dir}/spine.xml \
299 ${xml_dir}/authors.xml \
300 ${xml_dir}/api.xml \
301 ${xml_dir}/faq.xml
302
303xml_sources_manual = \
304 ${xml_dir}/manual/abi.xml \
305 ${xml_dir}/manual/algorithms.xml \
306 ${xml_dir}/manual/allocator.xml \
307 ${xml_dir}/manual/auto_ptr.xml \
308 ${xml_dir}/manual/atomics.xml \
309 ${xml_dir}/manual/backwards_compatibility.xml \
310 ${xml_dir}/manual/bitmap_allocator.xml \
311 ${xml_dir}/manual/build_hacking.xml \
312 ${xml_dir}/manual/codecvt.xml \
313 ${xml_dir}/manual/concurrency.xml \
314 ${xml_dir}/manual/concurrency_extensions.xml \
315 ${xml_dir}/manual/configure.xml \
316 ${xml_dir}/manual/containers.xml \
317 ${xml_dir}/manual/ctype.xml \
318 ${xml_dir}/manual/debug_mode.xml \
319 ${xml_dir}/manual/debug.xml \
320 ${xml_dir}/manual/diagnostics.xml \
d2b0caaa 321 ${xml_dir}/manual/documentation_hacking.xml \
0f752f44
BK
322 ${xml_dir}/manual/evolution.xml \
323 ${xml_dir}/manual/extensions.xml \
324 ${xml_dir}/manual/internals.xml \
325 ${xml_dir}/manual/intro.xml \
326 ${xml_dir}/manual/io.xml \
327 ${xml_dir}/manual/iterators.xml \
328 ${xml_dir}/manual/locale.xml \
329 ${xml_dir}/manual/localization.xml \
330 ${xml_dir}/manual/messages.xml \
331 ${xml_dir}/manual/mt_allocator.xml \
332 ${xml_dir}/manual/numerics.xml \
333 ${xml_dir}/manual/parallel_mode.xml \
ce1140e3 334 ${xml_dir}/manual/policy_data_structures.xml \
74080cba 335 ${xml_dir}/manual/policy_data_structures_biblio.xml \
0f752f44
BK
336 ${xml_dir}/manual/prerequisites.xml \
337 ${xml_dir}/manual/profile_mode.xml \
338 ${xml_dir}/manual/shared_ptr.xml \
339 ${xml_dir}/manual/spine.xml \
340 ${xml_dir}/manual/status_cxx1998.xml \
f25481f4 341 ${xml_dir}/manual/status_cxx2011.xml \
109a3af4 342 ${xml_dir}/manual/status_cxx2014.xml \
0f752f44
BK
343 ${xml_dir}/manual/status_cxxtr1.xml \
344 ${xml_dir}/manual/status_cxxtr24733.xml \
345 ${xml_dir}/manual/strings.xml \
346 ${xml_dir}/manual/support.xml \
347 ${xml_dir}/manual/test.xml \
ce1140e3 348 ${xml_dir}/manual/test_policy_data_structures.xml \
0f752f44
BK
349 ${xml_dir}/manual/using.xml \
350 ${xml_dir}/manual/using_exceptions.xml \
351 ${xml_dir}/manual/utilities.xml \
352 ${xml_dir}/manual/appendix_free.xml \
353 ${xml_dir}/manual/appendix_contributing.xml \
354 ${xml_dir}/manual/appendix_porting.xml
8a165db0
BK
355
356xml_sources_extra = \
669b5857 357 ${xml_dir}/gnu/fdl-1.3.xml \
60f8b2e2 358 ${xml_dir}/gnu/gpl-3.0.xml
0f752f44
BK
359
360xml_sources = \
361 ${xml_sources_basic} \
362 ${xml_sources_manual} \
363 ${xml_sources_extra}
8a165db0 364
154c4a08
BK
365xml_image_dir = ${xml_dir}/images
366xml_image_basic = \
367 ${xml_image_dir}/confdeps.png \
368 ${xml_image_dir}/pbds_balls_and_bins.png \
369 ${xml_image_dir}/pbds_container_tag_hierarchy.png \
370 ${xml_image_dir}/pbds_different_underlying_dss_1.png \
371 ${xml_image_dir}/pbds_different_underlying_dss_2.png \
372 ${xml_image_dir}/pbds_embedded_lists_1.png \
373 ${xml_image_dir}/pbds_embedded_lists_2.png \
374 ${xml_image_dir}/pbds_embedded_lists_3.png \
375 ${xml_image_dir}/pbds_exception_hierarchy.png \
376 ${xml_image_dir}/pbds_hash_policy_cd.png \
377 ${xml_image_dir}/pbds_hash_ranged_hash_range_hashing_fns.png \
378 ${xml_image_dir}/pbds_hash_range_hashing_seq_diagram2.png \
379 ${xml_image_dir}/pbds_hash_range_hashing_seq_diagram.png \
380 ${xml_image_dir}/pbds_insert_resize_sequence_diagram1.png \
381 ${xml_image_dir}/pbds_insert_resize_sequence_diagram2.png \
382 ${xml_image_dir}/pbds_insert_resize_sequence_diagram3.png \
383 ${xml_image_dir}/pbds_invalidation_guarantee_erase.png \
384 ${xml_image_dir}/pbds_invalidation_tag_hierarchy.png \
385 ${xml_image_dir}/pbds_list_update.png \
386 ${xml_image_dir}/pbds_node_invariants.png \
387 ${xml_image_dir}/pbds_pat_trie.png \
388 ${xml_image_dir}/pbds_point_iterator_hierarchy.png \
389 ${xml_image_dir}/pbds_point_iterators_range_ops_1.png \
390 ${xml_image_dir}/pbds_point_iterators_range_ops_2.png \
391 ${xml_image_dir}/pbds_priority_queue_different_underlying_dss.png \
392 ${xml_image_dir}/pbds_priority_queue_tag_hierarchy.png \
393 ${xml_image_dir}/pbds_rationale_null_node_updator.png \
394 ${xml_image_dir}/pbds_resize_policy_cd.png \
395 ${xml_image_dir}/pbds_restoring_node_invariants.png \
396 ${xml_image_dir}/pbds_simple_list.png \
397 ${xml_image_dir}/pbds_tree_node_invalidations.png \
398 ${xml_image_dir}/pbds_tree_node_invariants.png \
399 ${xml_image_dir}/pbds_tree_node_updator_policy_cd.png \
400 ${xml_image_dir}/pbds_trie_node_updator_policy_cd.png \
696d4bc1 401 ${xml_image_dir}/pbds_update_seq_diagram.png
154c4a08
BK
402
403xml_image_generated = \
404 ${xml_image_dir}/pbds_binary_priority_queue_int_push_pop.png \
405 ${xml_image_dir}/pbds_binary_priority_queue_int_push.png \
406 ${xml_image_dir}/pbds_ccgp_hash_int_subscript_insert.png \
407 ${xml_image_dir}/pbds_cc_hash_int_find.png \
408 ${xml_image_dir}/pbds_cc_hash_int_subscript_find.png \
409 ${xml_image_dir}/pbds_cc_hash_int_subscript_insert.png \
410 ${xml_image_dir}/pbds_gp_hash_int_find.png \
411 ${xml_image_dir}/pbds_gp_hash_int_subscript_find.png \
412 ${xml_image_dir}/pbds_gp_hash_int_subscript_insert.png \
413 ${xml_image_dir}/pbds_hash_int_erase_mem.png \
414 ${xml_image_dir}/pbds_hash_text_find.png \
415 ${xml_image_dir}/pbds_hash_zlob_int_find.png \
416 ${xml_image_dir}/pbds_multimap_text_find_large_s2p_hash.png \
417 ${xml_image_dir}/pbds_multimap_text_find_large_s2p_tree.png \
418 ${xml_image_dir}/pbds_multimap_text_find_small_s2p_hash.png \
419 ${xml_image_dir}/pbds_multimap_text_find_small_s2p_tree.png \
420 ${xml_image_dir}/pbds_multimap_text_insert_large_s2p_hash.png \
421 ${xml_image_dir}/pbds_multimap_text_insert_large_s2p_tree.png \
422 ${xml_image_dir}/pbds_multimap_text_insert_mem_large_s2p_hash.png \
423 ${xml_image_dir}/pbds_multimap_text_insert_mem_large_s2p_tree.png \
424 ${xml_image_dir}/pbds_multimap_text_insert_mem_small_s2p_hash.png \
425 ${xml_image_dir}/pbds_multimap_text_insert_mem_small_s2p_tree.png \
426 ${xml_image_dir}/pbds_multimap_text_insert_small_s2p_hash.png \
427 ${xml_image_dir}/pbds_multimap_text_insert_small_s2p_tree.png \
428 ${xml_image_dir}/pbds_pairing_priority_queue_text_modify_down_thin.png \
429 ${xml_image_dir}/pbds_pairing_priority_queue_text_modify_up_thin.png \
430 ${xml_image_dir}/pbds_pairing_priority_queue_text_push_pop.png \
431 ${xml_image_dir}/pbds_pairing_priority_queue_text_push.png \
432 ${xml_image_dir}/pbds_priority_queue_int_push_pop.png \
433 ${xml_image_dir}/pbds_priority_queue_int_push.png \
434 ${xml_image_dir}/pbds_priority_queue_text_join.png \
435 ${xml_image_dir}/pbds_priority_queue_text_modify_down.png \
436 ${xml_image_dir}/pbds_priority_queue_text_modify_up.png \
437 ${xml_image_dir}/pbds_priority_queue_text_pop_mem.png \
438 ${xml_image_dir}/pbds_priority_queue_text_push_pop.png \
439 ${xml_image_dir}/pbds_priority_queue_text_push.png \
440 ${xml_image_dir}/pbds_tree_int_find.png \
441 ${xml_image_dir}/pbds_tree_order_statistics.png \
442 ${xml_image_dir}/pbds_tree_split_join.png \
443 ${xml_image_dir}/pbds_tree_text_find.png \
444 ${xml_image_dir}/pbds_tree_text_insert_node.png \
445 ${xml_image_dir}/pbds_tree_text_insert_trie.png \
446 ${xml_image_dir}/pbds_tree_text_insert_vector.png \
447 ${xml_image_dir}/pbds_tree_text_lor_find.png
448
449xml_images = ${xml_image_basic} ${xml_image_generated}
a6aff075
BK
450
451xml_extradir = ${glibcxx_srcdir}/doc/html/ext
452xml_extra = \
453 ${xml_extradir}/lwg-active.html \
454 ${xml_extradir}/lwg-closed.html \
154c4a08 455 ${xml_extradir}/lwg-defects.html
a6aff075 456
8a165db0 457xml_noinst = \
0f752f44
BK
458 ${xml_dir}/book.txml \
459 ${xml_dir}/chapter.txml \
d2b0caaa 460 ${xml_dir}/class.txml \
154c4a08
BK
461 ${xml_image_dir}/confdeps.dot \
462 ${xml_image_dir}/confdeps.pdf
8a165db0
BK
463
464XSLTPROC = xsltproc
ce1140e3 465XSLT_FLAGS = --nonet --xinclude
109a3af4 466XSLT_PARAM = --param toc.section.depth 4 --param generate.consistent.ids 1
b329dd10
BK
467#XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
468#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
8a165db0 469XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
27f36b78 470XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
8d24c975 471XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl
43fe49ec 472XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl
8d24c975 473XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl
b25e6b79
BK
474
475${docbook_outdir}/epub:
476 mkdir -p ${docbook_outdir}/epub
43fe49ec 477 mkdir -p ${docbook_outdir}/epub/OEBPS/images
8a165db0 478
547f963b
BK
479${docbook_outdir}/fo:
480 mkdir -p ${docbook_outdir}/fo
481
03a32789
BK
482${docbook_outdir}/html:
483 mkdir -p ${docbook_outdir}/html
5e3a0ed1 484 mkdir -p ${docbook_outdir}/html/ext
a6aff075 485 mkdir -p ${docbook_outdir}/html/images
5e3a0ed1 486 mkdir -p ${docbook_outdir}/html/manual
8a165db0 487
03a32789
BK
488${docbook_outdir}/pdf:
489 mkdir -p ${docbook_outdir}/pdf
8a165db0 490
74080cba
BK
491${docbook_outdir}/latex:
492 mkdir -p ${docbook_outdir}/latex
493
547f963b
BK
494${docbook_outdir}/texinfo:
495 mkdir -p ${docbook_outdir}/texinfo
8a165db0 496
03a32789
BK
497${docbook_outdir}/xml:
498 mkdir -p ${docbook_outdir}/xml
8a165db0 499
8a165db0 500
547f963b
BK
501# XML, all one page
502# Some info on canonicalization
503# http://www.mail-archive.com/help-texinfo@gnu.org/msg00864.html
81df260f
BK
504manual_xml = ${docbook_outdir}/xml/libstdc++-manual.xml
505set_xml = ${docbook_outdir}/xml/libstdc++-set.xml
b25e6b79 506stamp-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
8a165db0 507 @echo "Generating XML single..."
b25e6b79
BK
508 $(XMLLINT) $(XMLLINT_FLAGS) \
509 ${top_srcdir}/doc/xml/manual/spine.xml > ${manual_xml};
510 $(XMLLINT) $(XMLLINT_FLAGS) \
511 ${top_srcdir}/doc/xml/spine.xml > ${set_xml};
b25e6b79
BK
512 $(STAMP) stamp-xml-single-docbook
513
514doc-xml-single-docbook: stamp-xml-single-docbook
8a165db0 515
74080cba
BK
516# Validate existing XML structure.
517XMLLINT = xmllint
518LINT_FLAGS = --debug --xinclude --noent --noblanks --noout
519SCHEMA_FLAGS = --dtdvalid http://www.docbook.org/xml/5.0/dtd/docbook.dtd
520SCHEMA_RNG_FLAGS = --relaxng http://www.docbook.org/xml/5.0/rng/docbook.rng
521#SCHEMA_FLAGS = --nonet --dtdvalid /usr/share/xxx/dtd/5.0/docbook.dtd
522XMLLINT_VALID_FLAGS = $(LINT_FLAGS) $(SCHEMA_FLAGS)
523XMLLINT_FLAGS = --xinclude --nsclean --c14n --noent --noblanks --nocdata
524doc-xml-validate-docbook: doc-xml-validate-dtd-db
525
526doc-xml-validate-dtd-db: $(xml_sources) $(xml_images)
527 @echo "Generating XML validation log..."
528 $(XMLLINT) $(XMLLINT_VALID_FLAGS) ${top_srcdir}/doc/xml/spine.xml
529
530doc-xml-validate-rng-db: $(xml_sources) $(xml_images) doc-xml-single-docbook
531 @echo "Generating XML RelaxNG validation log..."
532 $(XMLLINT) $(LINT_FLAGS) $(SCHEMA_RNG_FLAGS) ${set_xml}
533
a6aff075
BK
534# HTML support files
535stamp-html-docbook-images: stamp-html-docbook $(xml_images)
536 $(INSTALL_DATA) $(xml_images) ${docbook_outdir}/html/images
537 $(STAMP) stamp-html-docbook-images
538
539stamp-html-docbook-lwg: stamp-html-docbook $(xml_extra)
5e3a0ed1 540 $(INSTALL_DATA) $(xml_extra) ${docbook_outdir}/html/ext
a6aff075
BK
541 $(STAMP) stamp-html-docbook-lwg
542
543stamp-html-docbook-data: stamp-html-docbook-images stamp-html-docbook-lwg
544 $(STAMP) stamp-html-docbook-data
545
8d24c975 546# HTML, "chunked" into index plus chapters as separate pages
b25e6b79 547stamp-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 555doc-html-docbook: stamp-html-docbook-data
8a165db0
BK
556
557# HTML, all one page
8d24c975 558# NB: Have to generate customization XSL for UTF-8 output.
5bca11c4 559manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
b25e6b79 560stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
8a165db0 561 @echo "Generating html single file..."
ce1140e3 562 $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \
8d24c975
BK
563 ${XSL_LOCAL_STYLE} \
564 ${top_srcdir}/doc/xml/spine.xml
b25e6b79
BK
565 $(STAMP) stamp-html-single-docbook
566
567doc-html-single-docbook: stamp-html-single-docbook
8a165db0
BK
568
569# FO
b25e6b79 570stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
8a165db0 571 @echo "Generating FO files..."
ce1140e3 572 $(XSLTPROC) $(XSLT_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
8a165db0 573 $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
b25e6b79
BK
574 $(STAMP) stamp-fo-docbook
575
576doc-fo-docbook: stamp-fo-docbook
8a165db0 577
5bca11c4
BK
578# PDF, via dblatex
579manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf
74080cba
BK
580DBLATEX_FLAGS = --verbose --pdf --dump --debug --tmpdir=${docbook_outdir}/latex
581
582doc-pdf-docbook-dirs: ${docbook_outdir}/pdf ${docbook_outdir}/latex
583
584doc-pdf-docbook-pre: $(xml_sources) doc-pdf-docbook-dirs
585
586stamp-pdf-docbook: doc-pdf-docbook-pre doc-xml-single-docbook
40e053e3 587 @echo "Generating pdf dblatex files..."
74080cba
BK
588 dblatex $(DBLATEX_FLAGS) -o ${manual_pdf} \
589 ${top_srcdir}/doc/xml/spine.xml
b25e6b79
BK
590 $(STAMP) stamp-pdf-docbook
591
592doc-pdf-docbook: stamp-pdf-docbook
40e053e3 593
b25e6b79
BK
594# TEXINFO, via docbook2X
595# NB: Both experimental and tempermental
596manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi
597manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info
547f963b
BK
598DB2TEXI_FLAGS = \
599 --encoding=utf-8//TRANSLIT \
600 --string-param output-file="libstdc++-manual" \
601 --string-param directory-category="GNU C++ Library" \
7d8cafcd 602 --string-param explicit-node-names=true
b25e6b79
BK
603
604stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo
547f963b 605 @echo "Generating texinfo files..."
b25e6b79
BK
606 db2x_docbook2texi $(DB2TEXI_FLAGS) ${set_xml}
607 mv libstdc++-manual.texi ${manual_texi}
608 $(STAMP) stamp-texinfo-docbook
609
610stamp-info-docbook: stamp-texinfo-docbook
611 @echo "Generating info files..."
612 $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi}
613 $(STAMP) stamp-info-docbook
614
615doc-texinfo-docbook: stamp-texinfo-docbook
616
617doc-info-docbook: stamp-info-docbook
618
43fe49ec
BK
619# EPUB version 3
620# http://sourceforge.net/projects/docbook/files/epub3/
621# Can verify document with epubcheck
b25e6b79
BK
622manual_epub = ${docbook_outdir}/epub/libstdc++-manual.epub
623stamp-epub-docbook: stamp-xml-single-docbook ${docbook_outdir}/epub
624 @echo "Generating epub files..."
696d4bc1
BK
625 if [ ! -d "${docbook_outdir}/images" ]; then \
626 $(LN_S) ${top_srcdir}/doc/xml/images ${docbook_outdir}/; \
627 fi
43fe49ec
BK
628 $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) \
629 --stringparam base.dir "${docbook_outdir}/epub/OEBPS/" \
630 $(XSL_EPUB_STYLE) ${top_srcdir}/doc/xml/spine.xml
631 $(INSTALL_DATA) $(xml_images) ${docbook_outdir}/epub/OEBPS/images
632 zip -X0 ${manual_epub} ${docbook_outdir}/epub/mimetype
633 zip -r -X9 ${manual_epub} ${docbook_outdir}/epub/META-INF ${docbook_outdir}/epub/OEBPS
b25e6b79
BK
634 $(STAMP) stamp-epub-docbook
635
636doc-epub-docbook: stamp-epub-docbook
547f963b 637
03a32789
BK
638# Performance doc and graph configuration.
639# Assumes pychart, beautiful soup installed.
154c4a08
BK
640# Generates the plots/graph imagery for performance testing.
641doc_performance_script=${top_srcdir}/scripts/make_graph.py
642doc-svg-performance: ${docbook_outdir}/xml
03a32789 643 -@(chmod + ${doc_performance_script}; \
154c4a08
BK
644 ${doc_performance_script} \
645 ${top_srcdir}/testsuite/data/make_graph_test_infos.xml \
03a32789 646 ${glibcxx_builddir}/testsuite \
154c4a08 647 ${glibcxx_builddir}/doc/docbook/xml/images)
60f8b2e2 648
c4e82de9 649.PHONY: doc-doxygen-html doc-doxygen-man doc-performance
4312e020
BK
650
651# By adding these files here, automake will remove them for 'make clean'
b25e6b79 652CLEANFILES = *.log stamp*
4312e020
BK
653
654# To remove directories.
655clean-local:
b25e6b79 656 rm -rf man html pdf fo xml doxygen docbook ./libstdc++-* db2t*