]>
Commit | Line | Data |
---|---|---|
4312e020 BK |
1 | ## Makefile for the doc subdirectory of the GNU C++ Standard library. |
2 | ## | |
40e053e3 | 3 | ## Copyright (C) 2008, 2009, 2010 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 | # | |
27 | # There are two main source materials for libstdc++ documentation. | |
28 | # The first is the doxygen markup in libstdc++ sources. And the second | |
29 | # is the docbook markup in doc/xml/. A third and more obscure option | |
30 | # deals with charting performance tests. | |
31 | ||
32 | # Default, points to current best sub-rule that is the best conversion. | |
33 | # MAN | |
34 | doc-man: doc-man-doxygen | |
35 | ||
36 | ||
37 | doc-pdf: doc-pdf-dblatex-docbook | |
38 | ||
39 | # HTML | |
40 | doc-html: doc-html-docbook | |
41 | ||
8a165db0 BK |
42 | |
43 | # Doxygen configuration | |
0f752f44 | 44 | # Assumes doxygen, graphviz (with dot), pdflatex installed |
03a32789 BK |
45 | doxygen_script=${top_srcdir}/scripts/run_doxygen |
46 | doxygen_outdir = ${glibcxx_builddir}/doc/doxygen | |
8a165db0 | 47 | doc-html-doxygen: |
4312e020 BK |
48 | -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
49 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
03a32789 | 50 | ${SHELL} ${doxygen_script} \ |
40e053e3 | 51 | --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES) |
4312e020 | 52 | |
8a165db0 | 53 | doc-man-doxygen: |
4312e020 BK |
54 | -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
55 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
03a32789 | 56 | ${SHELL} ${doxygen_script} \ |
40e053e3 | 57 | --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES) |
4312e020 | 58 | |
0f752f44 | 59 | doc-xml-doxygen: |
8a165db0 BK |
60 | -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ |
61 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
03a32789 | 62 | ${SHELL} ${doxygen_script} \ |
40e053e3 | 63 | --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO) |
8a165db0 | 64 | |
0f752f44 | 65 | doc-xml-single-doxygen: doc-xml-doxygen |
8a165db0 | 66 | @echo "Generating doxygen xml single file..." |
03a32789 | 67 | $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \ |
0f752f44 | 68 | ${doxygen_outdir}/xml/index.xml > ${doxygen_outdir}/xml/api-spine.xml; |
4312e020 | 69 | |
0f752f44 BK |
70 | doc-latex-doxygen: |
71 | -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ | |
72 | builddir=`cd ..; ${PWD_COMMAND}`; \ | |
73 | ${SHELL} ${doxygen_script} \ | |
74 | --host_alias=${host_alias} --mode=latex $${srcdir} $${builddir} NO) | |
75 | ||
76 | # Chance of loooooonnggg wait time when creating this file. | |
77 | doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf | |
78 | ||
79 | doc-pdf-doxygen: stamp-latex-doxygen | |
80 | -(cd ${doxygen_outdir}/latex && $(MAKE) -i pdf;) | |
81 | echo "Generating doxygen pdf file..."; | |
82 | if [ -f ${doxygen_pdf} ]; then \ | |
83 | echo "... ${doxygen_pdf}"; \ | |
84 | else \ | |
85 | echo "... error"; \ | |
86 | exit 12; \ | |
87 | fi | |
88 | ||
89 | stamp-xml-doxygen: | |
90 | @if [ ! -f stamp-xml-doxygen ]; then \ | |
91 | $(MAKE) doc-xml-single-doxygen; \ | |
92 | fi | |
93 | $(STAMP) stamp-xml-doxygen | |
94 | ||
95 | stamp-latex-doxygen: | |
96 | @if [ ! -f stamp-latex-doxygen ]; then \ | |
97 | $(MAKE) doc-latex-doxygen; \ | |
98 | fi | |
99 | $(STAMP) stamp-latex-doxygen | |
8a165db0 BK |
100 | |
101 | # Docbook configuration. | |
102 | # Assumes | |
103 | # libxslt | |
0f752f44 BK |
104 | # dblatex |
105 | # pdflatex | |
8a165db0 | 106 | # docbook-style-xsl |
0f752f44 | 107 | # emacs-nxml-mode |
8a165db0 | 108 | # xmlto passivetex |
03a32789 | 109 | docbook_outdir = ${glibcxx_builddir}/doc/docbook |
0f752f44 BK |
110 | xml_dir = ${glibcxx_srcdir}/doc/xml |
111 | ||
112 | xml_sources_basic = \ | |
113 | ${xml_dir}/spine.xml \ | |
114 | ${xml_dir}/authors.xml \ | |
115 | ${xml_dir}/api.xml \ | |
116 | ${xml_dir}/faq.xml | |
117 | ||
118 | xml_sources_manual = \ | |
119 | ${xml_dir}/manual/abi.xml \ | |
120 | ${xml_dir}/manual/algorithms.xml \ | |
121 | ${xml_dir}/manual/allocator.xml \ | |
122 | ${xml_dir}/manual/auto_ptr.xml \ | |
123 | ${xml_dir}/manual/atomics.xml \ | |
124 | ${xml_dir}/manual/backwards_compatibility.xml \ | |
125 | ${xml_dir}/manual/bitmap_allocator.xml \ | |
126 | ${xml_dir}/manual/build_hacking.xml \ | |
127 | ${xml_dir}/manual/codecvt.xml \ | |
128 | ${xml_dir}/manual/concurrency.xml \ | |
129 | ${xml_dir}/manual/concurrency_extensions.xml \ | |
130 | ${xml_dir}/manual/configure.xml \ | |
131 | ${xml_dir}/manual/containers.xml \ | |
132 | ${xml_dir}/manual/ctype.xml \ | |
133 | ${xml_dir}/manual/debug_mode.xml \ | |
134 | ${xml_dir}/manual/debug.xml \ | |
135 | ${xml_dir}/manual/diagnostics.xml \ | |
136 | ${xml_dir}/manual/evolution.xml \ | |
137 | ${xml_dir}/manual/extensions.xml \ | |
138 | ${xml_dir}/manual/internals.xml \ | |
139 | ${xml_dir}/manual/intro.xml \ | |
140 | ${xml_dir}/manual/io.xml \ | |
141 | ${xml_dir}/manual/iterators.xml \ | |
142 | ${xml_dir}/manual/locale.xml \ | |
143 | ${xml_dir}/manual/localization.xml \ | |
144 | ${xml_dir}/manual/messages.xml \ | |
145 | ${xml_dir}/manual/mt_allocator.xml \ | |
146 | ${xml_dir}/manual/numerics.xml \ | |
147 | ${xml_dir}/manual/parallel_mode.xml \ | |
148 | ${xml_dir}/manual/prerequisites.xml \ | |
149 | ${xml_dir}/manual/profile_mode.xml \ | |
150 | ${xml_dir}/manual/shared_ptr.xml \ | |
151 | ${xml_dir}/manual/spine.xml \ | |
152 | ${xml_dir}/manual/status_cxx1998.xml \ | |
153 | ${xml_dir}/manual/status_cxx200x.xml \ | |
154 | ${xml_dir}/manual/status_cxxtr1.xml \ | |
155 | ${xml_dir}/manual/status_cxxtr24733.xml \ | |
156 | ${xml_dir}/manual/strings.xml \ | |
157 | ${xml_dir}/manual/support.xml \ | |
158 | ${xml_dir}/manual/test.xml \ | |
159 | ${xml_dir}/manual/using.xml \ | |
160 | ${xml_dir}/manual/using_exceptions.xml \ | |
161 | ${xml_dir}/manual/utilities.xml \ | |
162 | ${xml_dir}/manual/appendix_free.xml \ | |
163 | ${xml_dir}/manual/appendix_contributing.xml \ | |
164 | ${xml_dir}/manual/appendix_porting.xml | |
8a165db0 BK |
165 | |
166 | xml_sources_extra = \ | |
0f752f44 BK |
167 | ${xml_dir}/gnu/fdl-1.2.xml \ |
168 | ${xml_dir}/gnu/gpl-2.0.xml | |
169 | ||
170 | xml_sources = \ | |
171 | ${xml_sources_basic} \ | |
172 | ${xml_sources_manual} \ | |
173 | ${xml_sources_extra} | |
8a165db0 BK |
174 | |
175 | xml_noinst = \ | |
0f752f44 BK |
176 | ${xml_dir}/book.txml \ |
177 | ${xml_dir}/chapter.txml \ | |
178 | ${xml_dir}/class.txml \ | |
179 | ${xsl_dir}/doxygen2boostbook.xsl \ | |
180 | ${xsl_dir}/boostbook2docbook.xsl \ | |
181 | ${xsl_dir}/lookup.xsl | |
8a165db0 BK |
182 | |
183 | ||
184 | XSLTPROC = xsltproc | |
185 | XSLTPROC_FLAGS = --nonet --xinclude | |
186 | XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets | |
187 | XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl | |
188 | XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl | |
189 | #XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl | |
190 | XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl | |
191 | ||
03a32789 BK |
192 | ${docbook_outdir}/html: |
193 | mkdir -p ${docbook_outdir}/html | |
8a165db0 | 194 | |
03a32789 BK |
195 | ${docbook_outdir}/pdf: |
196 | mkdir -p ${docbook_outdir}/pdf | |
8a165db0 | 197 | |
03a32789 BK |
198 | ${docbook_outdir}/fo: |
199 | mkdir -p ${docbook_outdir}/fo | |
8a165db0 | 200 | |
03a32789 BK |
201 | ${docbook_outdir}/xml: |
202 | mkdir -p ${docbook_outdir}/xml | |
8a165db0 BK |
203 | |
204 | # Validate existing XML structure. | |
205 | XMLLINT = xmllint | |
0f752f44 | 206 | #LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning |
8a165db0 BK |
207 | #LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent |
208 | LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout | |
209 | VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd | |
210 | XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS) | |
03a32789 | 211 | doc-xml-validate-docbook: $(xml_sources) |
8a165db0 BK |
212 | @echo "Generating XML validation log..." |
213 | $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml | |
214 | ||
03a32789 | 215 | doc-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml |
8a165db0 BK |
216 | @echo "Generating XML single..." |
217 | $(XMLLINT) --xinclude --noent --noblanks \ | |
03a32789 | 218 | -o ${docbook_outdir}/xml/spine-single.xml \ |
8a165db0 BK |
219 | ${top_srcdir}/doc/xml/spine.xml |
220 | ||
221 | # HTML, index plus chapters | |
03a32789 | 222 | doc-html-docbook: $(xml_sources) ${docbook_outdir}/html |
8a165db0 | 223 | @echo "Generating html files..." |
03a32789 | 224 | $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \ |
8a165db0 BK |
225 | $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml |
226 | ||
227 | # HTML, all one page | |
03a32789 | 228 | doc-html-single-docbook: $(xml_sources) ${docbook_outdir}/html |
8a165db0 | 229 | @echo "Generating html single file..." |
03a32789 | 230 | $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \ |
8a165db0 BK |
231 | $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml |
232 | ||
233 | # FO | |
03a32789 | 234 | doc-fo-docbook: $(xml_sources) ${docbook_outdir}/fo |
8a165db0 | 235 | @echo "Generating FO files..." |
03a32789 | 236 | $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \ |
8a165db0 BK |
237 | $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml |
238 | ||
8a165db0 BK |
239 | # PDF 1 |
240 | # fop | |
241 | FOP = fop | |
242 | FOP_FLAGS = -d -r | |
0f752f44 | 243 | doc-pdf-fop-xml-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf |
8a165db0 BK |
244 | @echo "Generating pdf fop files from xml..." |
245 | $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \ | |
03a32789 | 246 | -xsl $(XSL_FO_STYLE) -pdf ${docbook_outdir}/pdf/spine.pdf |
8a165db0 | 247 | |
03a32789 | 248 | doc-pdf-fop-fo-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo |
8a165db0 | 249 | @echo "Generating pdf fop files from fo..." |
03a32789 BK |
250 | $(FOP) $(FOP_FLAGS) -fo ${docbook_outdir}/fo/spine.fo \ |
251 | -pdf ${docbook_outdir}/pdf/spine.pdf | |
8a165db0 BK |
252 | |
253 | # PDF 2 | |
254 | # xmlto | |
255 | XML2PDF = xmlto | |
256 | XML2PDF_FLAGS = -v pdf --skip-validation -o pdf | |
03a32789 | 257 | doc-pdf-xmlto-docbook: $(xml_sources) ${docbook_outdir}/pdf |
8a165db0 BK |
258 | @echo "Generating pdf xmlto files..." |
259 | $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml | |
260 | ||
261 | # PDF 3 | |
262 | # xmlroff | |
263 | XMLROFF = xmlroff | |
264 | XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue | |
03a32789 | 265 | doc-pdf-xmlroff-docbook: $(xml_sources) doc-fo |
8a165db0 | 266 | @echo "Generating pdf xmlroff files..." |
03a32789 | 267 | $(XMLROFF) $(XMLROFF_FLAGS) ${docbook_outdir}/fo/spine.fo |
8a165db0 BK |
268 | |
269 | # PDF 4 | |
270 | # prince | |
271 | PRINCE = prince | |
272 | PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf | |
03a32789 | 273 | doc-pdf-prince-docbook: $(xml_sources) ${docbook_outdir}/pdf |
8a165db0 | 274 | @echo "Generating pdf prince files..." |
03a32789 | 275 | $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/xml/spine.xml |
8a165db0 | 276 | |
40e053e3 BK |
277 | # PDF 5 |
278 | # dblatex | |
03a32789 BK |
279 | DBLATEX_FLAGS = --dump --verbose --pdf -o ${docbook_outdir}/pdf/manual.pdf |
280 | doc-pdf-dblatex-docbook: $(xml_sources) ${docbook_outdir}/pdf | |
40e053e3 BK |
281 | @echo "Generating pdf dblatex files..." |
282 | dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml | |
283 | ||
8a165db0 | 284 | |
03a32789 BK |
285 | # Performance doc and graph configuration. |
286 | # Assumes pychart, beautiful soup installed. | |
287 | # Generates the plots and graphs for performance testing. | |
288 | doc_performance_script=${top_srcdir}/scripts/make_graphs.py | |
289 | doc-html-performance: | |
290 | -@(chmod + ${doc_performance_script}; \ | |
291 | ${doc_performance_script} ${top_srcdir} \ | |
292 | ${glibcxx_builddir}/testsuite \ | |
293 | ${top_srcdir}/testsuite/data/make_graph_htmls.xml \ | |
294 | ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++) | |
295 | ||
c4e82de9 | 296 | .PHONY: doc-doxygen-html doc-doxygen-man doc-performance |
4312e020 BK |
297 | |
298 | # By adding these files here, automake will remove them for 'make clean' | |
8a165db0 | 299 | CLEANFILES = *.log |
4312e020 BK |
300 | |
301 | # To remove directories. | |
302 | clean-local: | |
0f752f44 | 303 | rm -rf man html pdf fo xml doxygen docbook stamp* |