1 ## Makefile for the doc subdirectory of the GNU C++ Standard library.
3 ## Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
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
11 ## Free Software Foundation; either version 3, or (at your option)
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.
19 ## You should have received a copy of the GNU General Public License along
20 ## with this library; see the file COPYING3. If not see
21 ## <http://www.gnu.org/licenses/>.
23 include $(top_srcdir)/fragment.am
26 # Doxygen configuration
27 # Assumes doxygen, graphviz (with dot) installed
28 doc_doxygen_script=${top_srcdir}/scripts/run_doxygen
30 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
31 builddir=`cd ..; ${PWD_COMMAND}`; \
32 ${SHELL} ${doc_doxygen_script} \
33 --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
36 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
37 builddir=`cd ..; ${PWD_COMMAND}`; \
38 ${SHELL} ${doc_doxygen_script} \
39 --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
42 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
43 builddir=`cd ..; ${PWD_COMMAND}`; \
44 ${SHELL} ${doc_doxygen_script} \
45 --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
47 doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
48 doc-xml-doxygen-single: doc-xml-doxygen
49 @echo "Generating doxygen xml single file..."
50 $(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
53 # Performance doc and graph configuration.
54 # Assumes pychart, beautiful soup installed.
55 # Generates the plots and graphs for performance testing.
56 doc_performance_script=${top_srcdir}/scripts/make_graphs.py
58 -@(chmod + ${doc_performance_script}; \
59 ${doc_performance_script} ${top_srcdir} \
60 ${glibcxx_builddir}/testsuite \
61 ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
62 ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
65 # Docbook configuration.
71 xml_srcdir = ${glibcxx_srcdir}/doc/xml
73 ${xml_srcdir}/spine.xml \
74 ${xml_srcdir}/authors.xml \
75 ${xml_srcdir}/manual/abi.xml \
76 ${xml_srcdir}/manual/algorithms.xml \
77 ${xml_srcdir}/manual/allocator.xml \
78 ${xml_srcdir}/manual/auto_ptr.xml \
79 ${xml_srcdir}/manual/backwards_compatibility.xml \
80 ${xml_srcdir}/manual/bitmap_allocator.xml \
81 ${xml_srcdir}/manual/build_hacking.xml \
82 ${xml_srcdir}/manual/codecvt.xml \
83 ${xml_srcdir}/manual/concurrency.xml \
84 ${xml_srcdir}/manual/configure.xml \
85 ${xml_srcdir}/manual/containers.xml \
86 ${xml_srcdir}/manual/ctype.xml \
87 ${xml_srcdir}/manual/debug_mode.xml \
88 ${xml_srcdir}/manual/debug.xml \
89 ${xml_srcdir}/manual/diagnostics.xml \
90 ${xml_srcdir}/manual/evolution.xml \
91 ${xml_srcdir}/manual/extensions.xml \
92 ${xml_srcdir}/manual/internals.xml \
93 ${xml_srcdir}/manual/intro.xml \
94 ${xml_srcdir}/manual/io.xml \
95 ${xml_srcdir}/manual/iterators.xml \
96 ${xml_srcdir}/manual/locale.xml \
97 ${xml_srcdir}/manual/localization.xml \
98 ${xml_srcdir}/manual/messages.xml \
99 ${xml_srcdir}/manual/mt_allocator.xml \
100 ${xml_srcdir}/manual/numerics.xml \
101 ${xml_srcdir}/manual/parallel_mode.xml \
102 ${xml_srcdir}/manual/prerequisites.xml \
103 ${xml_srcdir}/manual/profile_mode.xml \
104 ${xml_srcdir}/manual/internals.xml \
105 ${xml_srcdir}/manual/shared_ptr.xml \
106 ${xml_srcdir}/manual/spine.xml \
107 ${xml_srcdir}/manual/status_cxx1998.xml \
108 ${xml_srcdir}/manual/status_cxx200x.xml \
109 ${xml_srcdir}/manual/status_cxxtr1.xml \
110 ${xml_srcdir}/manual/status_cxxtr24733.xml \
111 ${xml_srcdir}/manual/strings.xml \
112 ${xml_srcdir}/manual/support.xml \
113 ${xml_srcdir}/manual/test.xml \
114 ${xml_srcdir}/manual/using.xml \
115 ${xml_srcdir}/manual/utilities.xml \
116 ${xml_srcdir}/manual/appendix_free.xml \
117 ${xml_srcdir}/manual/appendix_contributing.xml \
118 ${xml_srcdir}/manual/appendix_porting.xml \
119 ${xml_srcdir}/api.xml \
120 ${xml_srcdir}/faq.xml
122 xml_sources_extra = \
123 ${xml_srcdir}/gnu/fdl-1.2.xml \
124 ${xml_srcdir}/gnu/gpl-2.0.xml
127 ${xml_srcdir}/book.txml \
128 ${xml_srcdir}/chapter.txml \
129 ${xml_srcdir}/class.txml
133 XSLTPROC_FLAGS = --nonet --xinclude
134 XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
135 XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
136 XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
137 #XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
138 XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
140 ${glibcxx_builddir}/doc/html:
141 mkdir ${glibcxx_builddir}/doc/html
143 ${glibcxx_builddir}/doc/pdf:
144 mkdir ${glibcxx_builddir}/doc/pdf
146 ${glibcxx_builddir}/doc/fo:
147 mkdir ${glibcxx_builddir}/doc/fo
149 ${glibcxx_builddir}/doc/xml:
150 mkdir ${glibcxx_builddir}/doc/xml
152 # Validate existing XML structure.
154 #LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
155 #LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
156 LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
157 VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
158 XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
159 doc-xml-validate: $(xml_sources)
160 @echo "Generating XML validation log..."
161 $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
163 doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
164 @echo "Generating XML single..."
165 $(XMLLINT) --xinclude --noent --noblanks \
166 -o ${glibcxx_builddir}/doc/xml/spine-single.xml \
167 ${top_srcdir}/doc/xml/spine.xml
169 # HTML, index plus chapters
170 doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
171 @echo "Generating html files..."
172 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
173 $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
176 doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
177 @echo "Generating html single file..."
178 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
179 $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
182 doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
183 @echo "Generating FO files..."
184 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
185 $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
188 # Points to current best xml to PDF generation process.
189 doc-pdf: doc-pdf-dblatex
195 doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
196 @echo "Generating pdf fop files from xml..."
197 $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
198 -xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
200 doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
201 @echo "Generating pdf fop files from fo..."
202 $(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
203 -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
208 XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
209 doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
210 @echo "Generating pdf xmlto files..."
211 $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
216 XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
217 doc-pdf-xmlroff: $(xml_sources) doc-fo
218 @echo "Generating pdf xmlroff files..."
219 $(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
224 PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
225 doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
226 @echo "Generating pdf prince files..."
227 $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
231 DBLATEX_FLAGS = --dump --verbose --pdf -o pdf/manual.pdf
232 doc-pdf-dblatex: $(xml_sources) ${glibcxx_builddir}/doc/pdf
233 @echo "Generating pdf dblatex files..."
234 dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml
237 .PHONY: doc-doxygen-html doc-doxygen-man doc-performance
239 # By adding these files here, automake will remove them for 'make clean'
242 # To remove directories.
244 rm -rf man html pdf fo doxygen xml