OSDN Git Service

2011-02-08 Jonathan Wakely <jwakely.gcc@gmail.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / doc / Makefile.in
index 1598534..e6e1920 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -34,17 +34,19 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(top_srcdir)/fragment.am
+DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am
 subdir = doc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
@@ -54,6 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
        $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
        $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -63,8 +66,6 @@ CONFIG_CLEAN_VPATH_FILES =
 depcomp =
 am__depfiles_maybe =
 SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
 ACLOCAL = @ACLOCAL@
 ALLOCATOR_H = @ALLOCATOR_H@
@@ -101,11 +102,16 @@ CTIME_CC = @CTIME_CC@
 CTIME_H = @CTIME_H@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
+CXXFILT = @CXXFILT@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DBLATEX = @DBLATEX@
+DBTOEPUB = @DBTOEPUB@
 DEBUG_FLAGS = @DEBUG_FLAGS@
 DEFS = @DEFS@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -155,7 +161,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
 RANLIB = @RANLIB@
+RUBY = @RUBY@
 SECTION_FLAGS = @SECTION_FLAGS@
 SECTION_LDFLAGS = @SECTION_LDFLAGS@
 SED = @SED@
@@ -168,6 +176,10 @@ USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_FLAGS = @WARN_FLAGS@
 WERROR = @WERROR@
+
+# Validate existing XML structure.
+XMLLINT = xmllint
+XSLTPROC = xsltproc
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -210,20 +222,29 @@ host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
-htmldir = @htmldir@
+
+# HTML
+htmldir = "$(DESTDIR)@docdir@"
 includedir = @includedir@
-infodir = @infodir@
+
+# TEXINFO,INFO
+infodir = "$(DESTDIR)@infodir@"
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
-mandir = @mandir@
+lt_host_flags = @lt_host_flags@
+
+# MAN
+mandir = "$(DESTDIR)@mandir@"
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
 oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
+
+# PDF
+pdfdir = "$(DESTDIR)@docdir@"
 port_specific_symbol_files = @port_specific_symbol_files@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
@@ -262,125 +283,188 @@ WARN_CXXFLAGS = \
 
 # -I/-D flags to pass when compiling.
 AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+@BUILD_XML_FALSE@STAMP_XML = 
+
+# Documentation Overview
+#
+# There are two main input materials for libstdc++ documentation.
+# The first is the doxygen markup in libstdc++ sources, which is a
+# reference to the API. And the second is the manual, via docbook markup in
+# doc/xml/.
+#
+# A third and more obscure option deals with charting performance
+# tests, and should be considered experimental.
+
+# Documentation conditionals for output.
+@BUILD_XML_TRUE@STAMP_XML = doc-xml
+@BUILD_XML_FALSE@STAMP_INSTALL_XML = 
+@BUILD_XML_TRUE@STAMP_INSTALL_XML = doc-install-xml
+@BUILD_HTML_FALSE@STAMP_HTML = 
+@BUILD_HTML_TRUE@STAMP_HTML = doc-html
+@BUILD_HTML_FALSE@STAMP_INSTALL_HTML = 
+@BUILD_HTML_TRUE@STAMP_INSTALL_HTML = doc-install-html
+@BUILD_MAN_FALSE@STAMP_MAN = 
+@BUILD_MAN_TRUE@STAMP_MAN = doc-man
+@BUILD_MAN_FALSE@STAMP_INSTALL_MAN = 
+@BUILD_MAN_TRUE@STAMP_INSTALL_MAN = doc-install-man
+@BUILD_PDF_FALSE@STAMP_PDF = 
+@BUILD_PDF_TRUE@STAMP_PDF = doc-pdf
+@BUILD_PDF_FALSE@STAMP_INSTALL_PDF = 
+@BUILD_PDF_TRUE@STAMP_INSTALL_PDF = doc-install-pdf
+@BUILD_EPUB_FALSE@STAMP_EPUB = doc-epub
+@BUILD_EPUB_TRUE@STAMP_EPUB = doc-epub
+@BUILD_EPUB_FALSE@STAMP_INSTALL_EPUB = doc-install-epub
+@BUILD_EPUB_TRUE@STAMP_INSTALL_EPUB = doc-install-epub
+
+# Default creation and installation rules.
+# Point to best sub-rule for the requested documentation target and
+# create, and then install toplevel directory with standardized names
+# and layouts.
+
+# XML
+xmldir = "$(DESTDIR)@docdir@"
+
+# EPUB
+# Assumes ruby installed
+epubdir = "$(DESTDIR)@docdir@"
 
 # Doxygen configuration
-# Assumes doxygen, graphviz (with dot) installed
-doc_doxygen_script = ${top_srcdir}/scripts/run_doxygen
-doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
-
-# Performance doc and graph configuration.
-# Assumes pychart, beautiful soup installed.
-# Generates the plots and graphs for performance testing.
-doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
+# Assumes doxygen, graphviz (with dot), pdflatex installed
+doxygen_script = ${top_srcdir}/scripts/run_doxygen
+doxygen_outdir = ${glibcxx_builddir}/doc/doxygen
+api_xml = ${doxygen_outdir}/xml/libstdc++-api-single.xml
+doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf
+api_pdf = ${doxygen_outdir}/pdf/libstdc++-api.pdf
 
 # Docbook configuration.
 # Assumes
 # libxslt
+# dblatex
+# pdflatex
 # docbook-style-xsl
-# emacs-nxml-mode 
-# xmlto passivetex
-xml_srcdir = ${glibcxx_srcdir}/doc/xml
-xml_sources = \
-       ${xml_srcdir}/spine.xml \
-       ${xml_srcdir}/authors.xml \
-       ${xml_srcdir}/manual/abi.xml \
-       ${xml_srcdir}/manual/algorithms.xml \
-       ${xml_srcdir}/manual/allocator.xml \
-       ${xml_srcdir}/manual/auto_ptr.xml \
-       ${xml_srcdir}/manual/backwards_compatibility.xml \
-       ${xml_srcdir}/manual/bitmap_allocator.xml \
-       ${xml_srcdir}/manual/build_hacking.xml \
-       ${xml_srcdir}/manual/codecvt.xml \
-       ${xml_srcdir}/manual/concurrency.xml \
-       ${xml_srcdir}/manual/configure.xml \
-       ${xml_srcdir}/manual/containers.xml \
-       ${xml_srcdir}/manual/ctype.xml \
-       ${xml_srcdir}/manual/debug_mode.xml \
-       ${xml_srcdir}/manual/debug.xml \
-       ${xml_srcdir}/manual/diagnostics.xml \
-       ${xml_srcdir}/manual/evolution.xml \
-       ${xml_srcdir}/manual/extensions.xml \
-       ${xml_srcdir}/manual/internals.xml \
-       ${xml_srcdir}/manual/intro.xml \
-       ${xml_srcdir}/manual/io.xml \
-       ${xml_srcdir}/manual/iterators.xml \
-       ${xml_srcdir}/manual/locale.xml \
-       ${xml_srcdir}/manual/localization.xml \
-       ${xml_srcdir}/manual/messages.xml \
-       ${xml_srcdir}/manual/mt_allocator.xml \
-       ${xml_srcdir}/manual/numerics.xml \
-       ${xml_srcdir}/manual/parallel_mode.xml \
-       ${xml_srcdir}/manual/prerequisites.xml \
-       ${xml_srcdir}/manual/profile_mode.xml \
-       ${xml_srcdir}/manual/internals.xml \
-       ${xml_srcdir}/manual/shared_ptr.xml \
-       ${xml_srcdir}/manual/spine.xml \
-       ${xml_srcdir}/manual/status_cxx1998.xml \
-       ${xml_srcdir}/manual/status_cxx200x.xml \
-       ${xml_srcdir}/manual/status_cxxtr1.xml \
-       ${xml_srcdir}/manual/status_cxxtr24733.xml \
-       ${xml_srcdir}/manual/strings.xml \
-       ${xml_srcdir}/manual/support.xml \
-       ${xml_srcdir}/manual/test.xml \
-       ${xml_srcdir}/manual/using.xml \
-       ${xml_srcdir}/manual/utilities.xml \
-       ${xml_srcdir}/manual/appendix_free.xml \
-       ${xml_srcdir}/manual/appendix_contributing.xml \
-       ${xml_srcdir}/manual/appendix_porting.xml \
-       ${xml_srcdir}/api.xml \
-       ${xml_srcdir}/faq.xml
+# emacs-nxml-mode
+docbook_outdir = ${glibcxx_builddir}/doc/docbook
+xml_dir = ${glibcxx_srcdir}/doc/xml
+xml_sources_basic = \
+       ${xml_dir}/spine.xml \
+       ${xml_dir}/authors.xml \
+       ${xml_dir}/api.xml \
+       ${xml_dir}/faq.xml
+
+xml_sources_manual = \
+       ${xml_dir}/manual/abi.xml \
+       ${xml_dir}/manual/algorithms.xml \
+       ${xml_dir}/manual/allocator.xml \
+       ${xml_dir}/manual/auto_ptr.xml \
+       ${xml_dir}/manual/atomics.xml \
+       ${xml_dir}/manual/backwards_compatibility.xml \
+       ${xml_dir}/manual/bitmap_allocator.xml \
+       ${xml_dir}/manual/build_hacking.xml \
+       ${xml_dir}/manual/codecvt.xml \
+       ${xml_dir}/manual/concurrency.xml \
+       ${xml_dir}/manual/concurrency_extensions.xml \
+       ${xml_dir}/manual/configure.xml \
+       ${xml_dir}/manual/containers.xml \
+       ${xml_dir}/manual/ctype.xml \
+       ${xml_dir}/manual/debug_mode.xml \
+       ${xml_dir}/manual/debug.xml \
+       ${xml_dir}/manual/diagnostics.xml \
+       ${xml_dir}/manual/evolution.xml \
+       ${xml_dir}/manual/extensions.xml \
+       ${xml_dir}/manual/internals.xml \
+       ${xml_dir}/manual/intro.xml \
+       ${xml_dir}/manual/io.xml \
+       ${xml_dir}/manual/iterators.xml \
+       ${xml_dir}/manual/locale.xml \
+       ${xml_dir}/manual/localization.xml \
+       ${xml_dir}/manual/messages.xml \
+       ${xml_dir}/manual/mt_allocator.xml \
+       ${xml_dir}/manual/numerics.xml \
+       ${xml_dir}/manual/parallel_mode.xml \
+       ${xml_dir}/manual/prerequisites.xml \
+       ${xml_dir}/manual/profile_mode.xml \
+       ${xml_dir}/manual/shared_ptr.xml \
+       ${xml_dir}/manual/spine.xml \
+       ${xml_dir}/manual/status_cxx1998.xml \
+       ${xml_dir}/manual/status_cxx200x.xml \
+       ${xml_dir}/manual/status_cxxtr1.xml \
+       ${xml_dir}/manual/status_cxxtr24733.xml \
+       ${xml_dir}/manual/strings.xml \
+       ${xml_dir}/manual/support.xml \
+       ${xml_dir}/manual/test.xml \
+       ${xml_dir}/manual/using.xml \
+       ${xml_dir}/manual/using_exceptions.xml \
+       ${xml_dir}/manual/utilities.xml \
+       ${xml_dir}/manual/appendix_free.xml \
+       ${xml_dir}/manual/appendix_contributing.xml \
+       ${xml_dir}/manual/appendix_porting.xml
 
 xml_sources_extra = \
-       ${xml_srcdir}/gnu/fdl-1.2.xml \
-       ${xml_srcdir}/gnu/gpl-2.0.xml
+       ${xml_dir}/gnu/fdl-1.3.xml \
+       ${xml_dir}/gnu/gpl-3.0.xml
+
+xml_sources = \
+       ${xml_sources_basic} \
+       ${xml_sources_manual} \
+       ${xml_sources_extra}
 
 xml_noinst = \
-       ${xml_srcdir}/book.txml \
-       ${xml_srcdir}/chapter.txml \
-       ${xml_srcdir}/class.txml
+       ${xml_dir}/book.txml \
+       ${xml_dir}/chapter.txml \
+       ${xml_dir}/class.txml
 
-XSLTPROC = xsltproc
 XSLTPROC_FLAGS = --nonet --xinclude
-XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
+#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
+XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
 XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
-XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
+#XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
 #XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
-XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
+#XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
+XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/chunk.xsl
+XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/docbook.xsl
+XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub/docbook.xsl
+#LINT_FLAGS = --debug --xinclude --nsclean --postvalid --nowarning --nonet
+#LINT_FLAGS = --xinclude --postvalid --noent --noblanks --noout
+LINT_FLAGS = --debug --xinclude --noent --noblanks  --nonet --noout
+#SCHEMA_FLAGS = --relaxng /usr/share/xml/docbook5/schema/rng/5.0/docbookxi.rng
+SCHEMA_FLAGS = --dtdvalid /usr/share/xml/docbook5/schema/dtd/5.0/docbook.dtd
+XMLLINT_FLAGS = --xinclude --nsclean --c14n --noent --noblanks --nocdata
+XMLLINT_VALID_FLAGS = $(LINT_FLAGS) $(SCHEMA_FLAGS)
+
+# XML, all one page
+# Some info on canonicalization
+# http://www.mail-archive.com/help-texinfo@gnu.org/msg00864.html
+manual_xml = ${docbook_outdir}/xml/libstdc++-manual-single.xml
+set_xml = ${docbook_outdir}/xml/libstdc++-set-single.xml
 
-# Validate existing XML structure.
-XMLLINT = xmllint
-#LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning 
-#LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
-LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks  --nonet --noout
-VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
-XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
-
-# PDF 1
-# fop
-FOP = fop
-FOP_FLAGS = -d -r
-
-# PDF 2
-# xmlto
-XML2PDF = xmlto
-XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
-
-# PDF 3
-# xmlroff
-XMLROFF = xmlroff
-XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
-
-# PDF 4
-# prince
-PRINCE = prince
-PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
-
-# PDF 5
-# dblatex
-DBLATEX_FLAGS = --verbose --pdf -o pdf/spine.pdf
+# HTML, all one page
+manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
+
+# PDF, via dblatex
+manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf
+DBLATEX_FLAGS = --dump --verbose --pdf -o ${manual_pdf}
+
+# TEXINFO, via docbook2X
+# NB: Both experimental and tempermental
+manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi
+manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info
+DB2TEXI_FLAGS = \
+       --encoding=utf-8//TRANSLIT \
+       --string-param output-file="libstdc++-manual" \
+       --string-param directory-category="GNU C++ Library" \
+       --string-param explicit-node-names=true
+
+
+# EPUB, via dbtoepub + ruby
+manual_epub = ${docbook_outdir}/epub/libstdc++-manual.epub
+
+# Performance doc and graph configuration.
+# Assumes pychart, beautiful soup installed.
+# Generates the plots and graphs for performance testing.
+doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
 
 # By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.log
+CLEANFILES = *.log stamp*
 all: all-am
 
 .SUFFIXES:
@@ -426,37 +510,6 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='$(DISTFILES)'; \
-         dist_files=`for file in $$list; do echo $$file; done | \
-         sed -e "s|^$$srcdirstrip/||;t" \
-             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-       case $$dist_files in \
-         */*) $(MKDIR_P) `echo "$$dist_files" | \
-                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-                          sort -u` ;; \
-       esac; \
-       for file in $$dist_files; do \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         if test -d $$d/$$file; then \
-           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-           if test -d "$(distdir)/$$file"; then \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-         else \
-           test -f "$(distdir)/$$file" \
-           || cp -p $$d/$$file "$(distdir)/$$file" \
-           || exit 1; \
-         fi; \
-       done
 check-am: all-am
 check: check-am
 all-am: Makefile
@@ -495,42 +548,24 @@ distclean: distclean-am
        -rm -f Makefile
 distclean-am: clean-am distclean-generic
 
-dvi: dvi-am
-
 dvi-am:
 
-html: html-am
-
 html-am:
 
-info: info-am
-
 info-am:
 
 install-data-am:
 
-install-dvi: install-dvi-am
-
 install-dvi-am:
 
 install-exec-am:
 
-install-html: install-html-am
-
 install-html-am:
 
-install-info: install-info-am
-
 install-info-am:
 
-install-man:
-
-install-pdf: install-pdf-am
-
 install-pdf-am:
 
-install-ps: install-ps-am
-
 install-ps-am:
 
 installcheck-am:
@@ -543,12 +578,8 @@ mostlyclean: mostlyclean-am
 
 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
 
-pdf: pdf-am
-
 pdf-am:
 
-ps: ps-am
-
 ps-am:
 
 uninstall-am:
@@ -556,113 +587,289 @@ uninstall-am:
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       clean-local distclean distclean-generic distclean-libtool \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am
-
-doc-html-doxygen:
+       clean-local distclean distclean-generic distclean-libtool dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Documentation primary rules.
+#
+# xml:
+# html:
+# pdf:
+# man:
+# info:
+# ps:
+# dvi:
+# epub:
+# install-xml:
+# install-html:
+# install-pdf:
+# install-man:
+# install-info:
+# install-ps:
+# install-dvi:
+# install-epub:
+
+xml: $(STAMP_XML)
+install-xml: $(STAMP_INSTALL_XML)
+
+html: $(STAMP_HTML)
+install-html: $(STAMP_INSTALL_HTML)
+
+man: $(STAMP_MAN)
+install-man: $(STAMP_INSTALL_MAN)
+
+pdf: $(STAMP_PDF)
+install-pdf: $(STAMP_INSTALL_PDF)
+
+epub: $(STAMP_EPUB)
+install-epub: $(STAMP_INSTALL_EPUB)
+
+info:
+install-info:
+
+ps:
+install-ps:
+
+dvi:
+install-dvi:
+stamp-xml: stamp-xml-single-docbook stamp-xml-single-doxygen
+       $(STAMP) stamp-xml
+
+doc-xml: stamp-xml
+
+doc-install-xml: doc-xml
+       test -z ${xmldir} || $(mkinstalldirs) ${xmldir}
+       $(INSTALL_DATA) ${manual_xml} ${xmldir}
+       $(INSTALL_DATA) ${api_xml} ${xmldir}
+stamp-html: stamp-html-docbook stamp-html-doxygen
+       $(STAMP) stamp-html
+
+doc-html: stamp-html
+
+doc-install-html: doc-html
+       test -z ${htmldir} || $(mkinstalldirs) ${htmldir}
+       cp -r ${docbook_outdir}/html ${htmldir}/libstdc++-manual.html;
+       cp -r ${doxygen_outdir}/html ${htmldir}/libstdc++-api.html;
+stamp-pdf: stamp-pdf-docbook stamp-pdf-doxygen
+       $(STAMP) stamp-pdf
+
+doc-pdf: stamp-pdf
+
+doc-install-pdf: doc-pdf
+       test -z ${pdfdir} || $(mkinstalldirs) ${pdfdir}
+       $(INSTALL_DATA) ${docbook_outdir}/pdf/libstdc++-manual.pdf ${pdfdir}
+       $(INSTALL_DATA) ${doxygen_outdir}/pdf/libstdc++-api.pdf ${pdfdir}
+stamp-man: stamp-man-doxygen
+       $(STAMP) stamp-man
+
+doc-man: stamp-man
+
+doc-install-man: doc-man
+       test -z ${mandir} || $(mkinstalldirs) ${mandir}
+       cp -r ${doxygen_outdir}/man/man3 ${mandir}
+stamp-texinfo: stamp-texinfo-docbook
+       $(STAMP) stamp-texinfo
+
+stamp-info: stamp-info-docbook
+       $(STAMP) stamp-info
+
+doc-texinfo: stamp-texinfo
+
+doc-info: stamp-info
+
+doc-install-texinfo: doc-texinfo
+       test -z ${infodir} || $(mkinstalldirs) ${infodir}
+       $(INSTALL_DATA) ${manual_texi} ${infodir}
+
+doc-install-info: doc-info
+       test -z ${infodir} || $(mkinstalldirs) ${infodir}
+       $(INSTALL_DATA) ${manual_info} ${infodir}
+stamp-epub: stamp-epub-docbook
+       $(STAMP) stamp-epub
+
+doc-epub: stamp-epub
+
+doc-install-epub: doc-epub
+       test -z ${epubdir} || $(mkinstalldirs) ${epubdir}
+       $(INSTALL_DATA) ${manual_epub} ${epubdir}
+
+${doxygen_outdir}/xml:
+       mkdir -p ${doxygen_outdir}/xml
+
+${doxygen_outdir}/html:
+       mkdir -p ${doxygen_outdir}/html
+
+${doxygen_outdir}/latex:
+       mkdir -p ${doxygen_outdir}/latex
+
+${doxygen_outdir}/pdf:
+       mkdir -p ${doxygen_outdir}/pdf
+
+${doxygen_outdir}/man:
+       mkdir -p ${doxygen_outdir}/man
+
+stamp-xml-doxygen: ${doxygen_outdir}/xml
        -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
          builddir=`cd ..; ${PWD_COMMAND}`; \
-         ${SHELL} ${doc_doxygen_script} \
-         --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
+         ${SHELL} ${doxygen_script} \
+         --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
+       $(STAMP) stamp-xml-doxygen
+
+stamp-xml-single-doxygen: stamp-xml-doxygen
+       @echo "Generating doxygen xml single file..."
+       $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \
+       ${doxygen_outdir}/xml/index.xml > ${api_xml};
+       $(STAMP) stamp-xml-single-doxygen
 
-doc-man-doxygen:
+stamp-html-doxygen: ${doxygen_outdir}/html
        -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
          builddir=`cd ..; ${PWD_COMMAND}`; \
-         ${SHELL} ${doc_doxygen_script} \
-         --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
+         ${SHELL} ${doxygen_script} \
+         --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
+       $(STAMP) stamp-html-doxygen
 
-doc-xml-doxygen:
+stamp-latex-doxygen: ${doxygen_outdir}/latex
        -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
          builddir=`cd ..; ${PWD_COMMAND}`; \
-         ${SHELL} ${doc_doxygen_script} \
-         --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
-doc-xml-doxygen-single: doc-xml-doxygen
-       @echo "Generating doxygen xml single file..."
-       $(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
-doc-html-performance:
-       -@(chmod + ${doc_performance_script}; \
-       ${doc_performance_script} ${top_srcdir} \
-       ${glibcxx_builddir}/testsuite \
-       ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
-       ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
+         ${SHELL} ${doxygen_script} \
+         --host_alias=${host_alias} --mode=latex $${srcdir} $${builddir} NO)
+       $(STAMP) stamp-latex-doxygen
+
+# Chance of loooooonnggg creation time on this rule.  Iff this fails,
+# look at refman.log and see if TeX's memory is exhausted. Symptoms
+# include asking a wizard to enlarge capacity. If this is the case,
+# find texmf.cnf and add a zero for pool_size, string_vacancies,
+# max_strings, and pool_free values.
+stamp-pdf-doxygen: stamp-latex-doxygen ${doxygen_outdir}/pdf
+       -(cd ${doxygen_outdir}/latex && $(MAKE) -i pdf;)
+       echo "Generating doxygen pdf file...";
+       if [ -f ${doxygen_pdf} ]; then \
+         mv ${doxygen_pdf} ${api_pdf} ; \
+         echo ":: PDF file is ${api_pdf}"; \
+       else \
+         echo "... error"; \
+         exit 12; \
+       fi
+       $(STAMP) stamp-pdf-doxygen
+
+stamp-man-doxygen: ${doxygen_outdir}/man
+       -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+         builddir=`cd ..; ${PWD_COMMAND}`; \
+         ${SHELL} ${doxygen_script} \
+         --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
+       $(STAMP) stamp-man-doxygen
 
-${glibcxx_builddir}/doc/html:
-       mkdir ${glibcxx_builddir}/doc/html
+doc-xml-doxygen: stamp-xml-doxygen
+doc-xml-single-doxygen: stamp-xml-single-doxygen
+doc-html-doxygen: stamp-html-doxygen
+doc-latex-doxygen: stamp-latex-doxygen
+doc-pdf-doxygen: stamp-pdf-doxygen
+doc-man-doxygen: stamp-man-doxygen
 
-${glibcxx_builddir}/doc/pdf:
-       mkdir ${glibcxx_builddir}/doc/pdf
+${docbook_outdir}/epub:
+       mkdir -p ${docbook_outdir}/epub
 
-${glibcxx_builddir}/doc/fo:
-       mkdir ${glibcxx_builddir}/doc/fo
+${docbook_outdir}/fo:
+       mkdir -p ${docbook_outdir}/fo
 
-${glibcxx_builddir}/doc/xml:
-       mkdir ${glibcxx_builddir}/doc/xml
-doc-xml-validate: $(xml_sources)
-       @echo "Generating XML validation log..."
-       $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+${docbook_outdir}/html:
+       mkdir -p ${docbook_outdir}/html
 
-doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
+${docbook_outdir}/pdf:
+       mkdir -p ${docbook_outdir}/pdf
+
+${docbook_outdir}/texinfo:
+       mkdir -p ${docbook_outdir}/texinfo
+
+${docbook_outdir}/xml:
+       mkdir -p ${docbook_outdir}/xml
+doc-xml-validate-docbook: $(xml_sources)
+       @echo "Generating XML validation log..."
+       $(XMLLINT) $(XMLLINT_VALID_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+stamp-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
        @echo "Generating XML single..."
-       $(XMLLINT) --xinclude --noent --noblanks \
-       -o ${glibcxx_builddir}/doc/xml/spine-single.xml \
-       ${top_srcdir}/doc/xml/spine.xml
+       $(XMLLINT) $(XMLLINT_FLAGS) \
+       ${top_srcdir}/doc/xml/manual/spine.xml > ${manual_xml};
+       $(XMLLINT) $(XMLLINT_FLAGS) \
+       ${top_srcdir}/doc/xml/spine.xml > ${set_xml};
+       if [ ! -d "${docbook_outdir}/xml/images" ]; then \
+         $(LN_S) ${top_srcdir}/doc/xml/images ${docbook_outdir}/xml/; \
+       fi
+       $(STAMP) stamp-xml-single-docbook
+
+doc-xml-single-docbook: stamp-xml-single-docbook
 
 # HTML, index plus chapters
-doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
+stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
        @echo "Generating html files..."
-       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
        $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
+       $(STAMP) stamp-html-docbook
 
-# HTML, all one page
-doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
+doc-html-docbook: stamp-html-docbook
+stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
        @echo "Generating html single file..."
-       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${manual_html} \
        $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
+       $(STAMP) stamp-html-single-docbook
+
+doc-html-single-docbook: stamp-html-single-docbook
 
 # FO
-doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
+stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
        @echo "Generating FO files..."
-       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
+       $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
        $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
+       $(STAMP) stamp-fo-docbook
 
-# PDF
-# Points to current best xml to PDF generation process.
-doc-pdf: doc-pdf-dblatex
-doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf 
-       @echo "Generating pdf fop files from xml..."
-       $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
-       -xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
-
-doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
-       @echo "Generating pdf fop files from fo..."
-       $(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
-       -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
-doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
-       @echo "Generating pdf xmlto files..."
-       $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
-doc-pdf-xmlroff: $(xml_sources) doc-fo
-       @echo "Generating pdf xmlroff files..."
-       $(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
-doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
-       @echo "Generating pdf prince files..."
-       $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
-doc-pdf-dblatex: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+doc-fo-docbook: stamp-fo-docbook
+stamp-pdf-docbook: $(xml_sources) ${docbook_outdir}/pdf
        @echo "Generating pdf dblatex files..."
        dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+       $(STAMP) stamp-pdf-docbook
+
+doc-pdf-docbook: stamp-pdf-docbook
+
+stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo
+       @echo "Generating texinfo files..."
+       db2x_docbook2texi $(DB2TEXI_FLAGS) ${set_xml}
+       mv libstdc++-manual.texi ${manual_texi}
+       $(STAMP) stamp-texinfo-docbook
+
+stamp-info-docbook: stamp-texinfo-docbook
+       @echo "Generating info files..."
+       $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi}
+       $(STAMP) stamp-info-docbook
+
+doc-texinfo-docbook: stamp-texinfo-docbook
+
+doc-info-docbook: stamp-info-docbook
+stamp-epub-docbook: stamp-xml-single-docbook ${docbook_outdir}/epub
+       @echo "Generating epub files..."
+       ${XSL_STYLE_DIR}/epub/bin/dbtoepub -v -d -o ${manual_epub} ${set_xml}
+       $(STAMP) stamp-epub-docbook
+
+doc-epub-docbook: stamp-epub-docbook
+doc-html-performance:
+       -@(chmod + ${doc_performance_script}; \
+       ${doc_performance_script} ${top_srcdir} \
+       ${glibcxx_builddir}/testsuite \
+       ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
+       ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
 
 .PHONY: doc-doxygen-html doc-doxygen-man doc-performance
 
 # To remove directories.
 clean-local:
-       rm -rf man html pdf fo doxygen xml
+       rm -rf man html pdf fo xml doxygen docbook ./libstdc++-* db2t*
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.