mainpage.html: Add in corrected links.
[gcc.git] / libstdc++-v3 / doc / Makefile.am
1 ## Makefile for the doc subdirectory of the GNU C++ Standard library.
2 ##
3 ## Copyright (C) 2008 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 2, 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 COPYING. If not, write to the Free
21 ## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 ## USA.
23
24 include $(top_srcdir)/fragment.am
25
26
27 # Doxygen configuration
28 # Assumes doxygen, graphviz (with dot) installed
29 doc_doxygen_script=${top_srcdir}/scripts/run_doxygen
30 doc-html-doxygen:
31 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
32 builddir=`cd ..; ${PWD_COMMAND}`; \
33 ${SHELL} ${doc_doxygen_script} \
34 --host_alias=${host_alias} --mode=html $${srcdir} $${builddir})
35
36 doc-man-doxygen:
37 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
38 builddir=`cd ..; ${PWD_COMMAND}`; \
39 ${SHELL} ${doc_doxygen_script} \
40 --host_alias=${host_alias} --mode=man $${srcdir} $${builddir})
41
42 doc-xml-doxygen:
43 -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
44 builddir=`cd ..; ${PWD_COMMAND}`; \
45 ${SHELL} ${doc_doxygen_script} \
46 --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir})
47
48 doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
49 doc-xml-doxygen-single: doc-xml-doxygen
50 @echo "Generating doxygen xml single file..."
51 $(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
52
53
54 # Performance doc and graph configuration.
55 # Assumes pychart, beautiful soup installed.
56 # Generates the plots and graphs for performance testing.
57 doc_performance_script=${top_srcdir}/scripts/make_graphs.py
58 doc-html-performance:
59 -@(chmod + ${doc_performance_script}; \
60 ${doc_performance_script} ${top_srcdir} \
61 ${glibcxx_builddir}/testsuite \
62 ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
63 ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
64
65
66 # Docbook configuration.
67 # Assumes
68 # libxslt
69 # docbook-style-xsl
70 # emacs-nxml-mode
71 # xmlto passivetex
72 xml_srcdir = ${glibcxx_srcdir}/doc/xml
73 xml_sources = \
74 ${xml_srcdir}/spine.xml \
75 ${xml_srcdir}/authors.xml \
76 ${xml_srcdir}/manual/abi.xml \
77 ${xml_srcdir}/manual/algorithms.xml \
78 ${xml_srcdir}/manual/allocator.xml \
79 ${xml_srcdir}/manual/auto_ptr.xml \
80 ${xml_srcdir}/manual/backwards_compatibility.xml \
81 ${xml_srcdir}/manual/bitmap_allocator.xml \
82 ${xml_srcdir}/manual/build.xml \
83 ${xml_srcdir}/manual/build_hacking.xml \
84 ${xml_srcdir}/manual/codecvt.xml \
85 ${xml_srcdir}/manual/concurrency.xml \
86 ${xml_srcdir}/manual/configure.xml \
87 ${xml_srcdir}/manual/containers.xml \
88 ${xml_srcdir}/manual/ctype.xml \
89 ${xml_srcdir}/manual/debug_mode.xml \
90 ${xml_srcdir}/manual/debug.xml \
91 ${xml_srcdir}/manual/diagnostics.xml \
92 ${xml_srcdir}/manual/evolution.xml \
93 ${xml_srcdir}/manual/extensions.xml \
94 ${xml_srcdir}/manual/internals.xml \
95 ${xml_srcdir}/manual/intro.xml \
96 ${xml_srcdir}/manual/io.xml \
97 ${xml_srcdir}/manual/iterators.xml \
98 ${xml_srcdir}/manual/locale.xml \
99 ${xml_srcdir}/manual/localization.xml \
100 ${xml_srcdir}/manual/messages.xml \
101 ${xml_srcdir}/manual/mt_allocator.xml \
102 ${xml_srcdir}/manual/numerics.xml \
103 ${xml_srcdir}/manual/parallel_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/strings.xml \
111 ${xml_srcdir}/manual/support.xml \
112 ${xml_srcdir}/manual/test.xml \
113 ${xml_srcdir}/manual/using.xml \
114 ${xml_srcdir}/manual/utilities.xml \
115 ${xml_srcdir}/manual/appendix_free.xml \
116 ${xml_srcdir}/manual/appendix_contributing.xml \
117 ${xml_srcdir}/manual/appendix_porting.xml \
118 ${xml_srcdir}/api.xml \
119 ${xml_srcdir}/faq.xml
120
121 xml_sources_extra = \
122 ${xml_srcdir}/gnu/fdl-1.2.xml \
123 ${xml_srcdir}/gnu/gpl-2.0.xml
124
125 xml_noinst = \
126 ${xml_srcdir}/book.txml \
127 ${xml_srcdir}/chapter.txml \
128 ${xml_srcdir}/class.txml
129
130
131 XSLTPROC = xsltproc
132 XSLTPROC_FLAGS = --nonet --xinclude
133 XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
134 XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
135 XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
136 #XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
137 XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
138
139 ${glibcxx_builddir}/doc/html:
140 mkdir ${glibcxx_builddir}/doc/html
141
142 ${glibcxx_builddir}/doc/pdf:
143 mkdir ${glibcxx_builddir}/doc/pdf
144
145 ${glibcxx_builddir}/doc/fo:
146 mkdir ${glibcxx_builddir}/doc/fo
147
148 ${glibcxx_builddir}/doc/xml:
149 mkdir ${glibcxx_builddir}/doc/xml
150
151 # Validate existing XML structure.
152 XMLLINT = xmllint
153 #LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
154 #LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
155 LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
156 VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
157 XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
158 doc-xml-validate: $(xml_sources)
159 @echo "Generating XML validation log..."
160 $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
161
162 doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
163 @echo "Generating XML single..."
164 $(XMLLINT) --xinclude --noent --noblanks \
165 -o ${glibcxx_builddir}/doc/xml/spine-single.xml \
166 ${top_srcdir}/doc/xml/spine.xml
167
168 # HTML, index plus chapters
169 doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
170 @echo "Generating html files..."
171 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
172 $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
173
174 # HTML, all one page
175 doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
176 @echo "Generating html single file..."
177 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
178 $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
179
180 # FO
181 doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
182 @echo "Generating FO files..."
183 $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
184 $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
185
186 # PDF
187 # Points to current best xml to PDF generation process.
188 doc-pdf: doc-pdf-prince
189
190 # PDF 1
191 # fop
192 FOP = fop
193 FOP_FLAGS = -d -r
194 doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
195 @echo "Generating pdf fop files from xml..."
196 $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
197 -xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
198
199 doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
200 @echo "Generating pdf fop files from fo..."
201 $(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
202 -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
203
204 # PDF 2
205 # xmlto
206 XML2PDF = xmlto
207 XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
208 doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
209 @echo "Generating pdf xmlto files..."
210 $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
211
212 # PDF 3
213 # xmlroff
214 XMLROFF = xmlroff
215 XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
216 doc-pdf-xmlroff: $(xml_sources) doc-fo
217 @echo "Generating pdf xmlroff files..."
218 $(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
219
220 # PDF 4
221 # prince
222 PRINCE = prince
223 PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
224 doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
225 @echo "Generating pdf prince files..."
226 $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
227
228
229 # No install-pdf, install-html support in automake yet
230 install-pdf:
231 install-html:
232
233 # Installation of distribution html documentation not yet supported
234 # TODO: Write custom install-html rule.
235 .PHONY: install-html install-pdf \
236 doc-doxygen-html doc-doxygen-man doc-performance
237
238 # By adding these files here, automake will remove them for 'make clean'
239 CLEANFILES = *.log
240
241 # To remove directories.
242 clean-local:
243 rm -rf man html pdf fo doxygen xml