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