Merge -r 127928:132243 from trunk
[official-gcc.git] / libstdc++-v3 / doc / Makefile.am
blob926ceec70a85172d8f1009a2921bd2b14c38a1ad
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.
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.
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 COPYING.  If not, write to the Free
21 ## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 ## USA.
24 include $(top_srcdir)/fragment.am
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})
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})
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})
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;
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++)
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/spine.xml \
77         ${xml_srcdir}/manual/abi.xml \
78         ${xml_srcdir}/manual/algorithms.xml \
79         ${xml_srcdir}/manual/allocator.xml \
80         ${xml_srcdir}/manual/auto_ptr.xml \
81         ${xml_srcdir}/manual/backwards_compatibility.xml \
82         ${xml_srcdir}/manual/bitmap_allocator.xml \
83         ${xml_srcdir}/manual/build.xml \
84         ${xml_srcdir}/manual/build_hacking.xml \
85         ${xml_srcdir}/manual/codecvt.xml \
86         ${xml_srcdir}/manual/concurrency.xml \
87         ${xml_srcdir}/manual/configure.xml \
88         ${xml_srcdir}/manual/containers.xml \
89         ${xml_srcdir}/manual/ctype.xml \
90         ${xml_srcdir}/manual/debug_mode.xml \
91         ${xml_srcdir}/manual/debug.xml \
92         ${xml_srcdir}/manual/diagnostics.xml \
93         ${xml_srcdir}/manual/evolution.xml \
94         ${xml_srcdir}/manual/extensions.xml \
95         ${xml_srcdir}/manual/internals.xml \
96         ${xml_srcdir}/manual/intro.xml \
97         ${xml_srcdir}/manual/io.xml \
98         ${xml_srcdir}/manual/iterators.xml \
99         ${xml_srcdir}/manual/locale.xml \
100         ${xml_srcdir}/manual/localization.xml \
101         ${xml_srcdir}/manual/messages.xml \
102         ${xml_srcdir}/manual/mt_allocator.xml \
103         ${xml_srcdir}/manual/numerics.xml \
104         ${xml_srcdir}/manual/parallel_mode.xml \
105         ${xml_srcdir}/manual/internals.xml \
106         ${xml_srcdir}/manual/shared_ptr.xml \
107         ${xml_srcdir}/manual/spine.xml \
108         ${xml_srcdir}/manual/status_cxx1998.xml \
109         ${xml_srcdir}/manual/status_cxx200x.xml \
110         ${xml_srcdir}/manual/status_cxxtr1.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
126 xml_noinst = \
127         ${xml_srcdir}/book.txml \
128         ${xml_srcdir}/chapter.txml \
129         ${xml_srcdir}/class.txml
132 XSLTPROC       = xsltproc
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.
153 XMLLINT = xmllint
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
175 # HTML, all one page
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
181 # FO
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
187 # PDF
188 # Points to current best xml to PDF generation process.
189 doc-pdf: doc-pdf-xmlto
191 # PDF 1
192 # fop
193 FOP = fop
194 FOP_FLAGS = -d -r
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
205 # PDF 2
206 # xmlto
207 XML2PDF = xmlto
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
213 # PDF 3
214 # xmlroff
215 XMLROFF = xmlroff
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
221 # PDF 4
222 # prince
223 PRINCE = prince
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
230 # No install-pdf, install-html support in automake yet
231 install-pdf:
232 install-html:
234 # Installation of distribution html documentation not yet supported
235 # TODO: Write custom install-html rule.
236 .PHONY: install-html install-pdf \
237         doc-doxygen-html doc-doxygen-man doc-performance
239 # By adding these files here, automake will remove them for 'make clean'
240 CLEANFILES = *.log
242 # To remove directories.
243 clean-local:
244         rm -rf man html pdf fo doxygen xml