This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3] doc creation/installation rules
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 31 Dec 2010 14:12:00 -0800
- Subject: [v3] doc creation/installation rules
Adds the following rules as per the GNU Coding Standards:
html, pdf, man, info, ps, dvi
Adds as extensions:
xml, epub
And associated install rules.
Using the same approach used for makeinfo, these rules are
conditionalized based on the existence of the necessary dependencies.
These conditions are pretty strict at the moment.
Note that the existing private rules, the ones prefixed with doc-, are
always available.
tested x86_64/linux
-benjamin
2010-12-31 Benjamin Kosnik <bkoz@redhat.com>
* scripts/run_doxygen: Allow doxygen 1.7.1 again.
* doc/xml/manual/build_hacking.xml: Update.
* doc/xml/images/confdeps.dot: Same.
* doc/xml/images/confdeps.png: Same.
* configure.ac: Define BUILD_INFO, BUILD_XML, BUILD_HTML,
BUILD_MAN, BUILD_PDF, BUILD_EPUB conditionally.
* Makefile.am (xml, html, pdf, man, info, pd, dvi, epub): Define,
and install rules.
* doc/Makefile.am: Same. Add stamp rules.
(doc-epub-docbook): Add.
(stamp-xml-single-docbook): Make set too.
* configure: Regenerate.
* Makefile.in: Same.
* doc/Makefile.in: Same.
* include/Makefile.in: Same.
* libsupc++/Makefile.in: Same.
* po/Makefile.in: Same.
* python/Makefile.in: Same.
* src/Makefile.in: Same.
* testsuite/Makefile.in: Same.
* aclocal.m4: Same.
2010-12-31 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/user.cfg.in: Disable PDF_HYPERLINKS.
Index: scripts/run_doxygen
===================================================================
--- scripts/run_doxygen (revision 168323)
+++ scripts/run_doxygen (working copy)
@@ -13,7 +13,7 @@
# We can check now that the version of doxygen is >= this variable.
-DOXYVER=1.7.2
+DOXYVER=1.7.1
find_doxygen() {
local -r v_required=`echo $DOXYVER | \
Index: configure.ac
===================================================================
--- configure.ac (revision 168323)
+++ configure.ac (working copy)
@@ -232,7 +232,7 @@
AC_DEFINE(HAVE_HYPOT)
# GLIBCXX_CHECK_STDLIB_SUPPORT
- AC_DEFINE(HAVE_STRTOF)
+ AC_DEFINE(HAVE_STRTOF)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
@@ -327,6 +327,59 @@
# This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
GLIBCXX_CONFIGURE_TESTSUITE
+# Define documentation rules conditionally.
+
+# See if makeinfo has been installed and is modern enough
+# that we can use it.
+ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
+ [GNU texinfo.* \([0-9][0-9.]*\)],
+ [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
+AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
+
+# Check for doxygen
+AC_CHECK_PROG([DOXYGEN], doxygen, yes, no)
+AC_CHECK_PROG([DOT], dot, yes, no)
+
+# Check for docbook
+AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no)
+AC_CHECK_PROG([XMLLINT], xmllint, yes, no)
+AC_CHECK_FILE([/usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION],
+ [glibcxx_stylesheets=yes], [glibcxx_stylesheets=no])
+
+# Check for xml/html dependencies.
+AM_CONDITIONAL(BUILD_XML,
+ test $ac_cv_prog_DOXYGEN = "yes" &&
+ test $ac_cv_prog_DOT = "yes" &&
+ test $ac_cv_prog_XSLTPROC = "yes" &&
+ test $ac_cv_prog_XMLLINT = "yes" &&
+ test $glibcxx_stylesheets = "yes")
+
+AM_CONDITIONAL(BUILD_HTML,
+ test $ac_cv_prog_DOXYGEN = "yes" &&
+ test $ac_cv_prog_DOT = "yes" &&
+ test $ac_cv_prog_XSLTPROC = "yes" &&
+ test $ac_cv_prog_XMLLINT = "yes" &&
+ test $glibcxx_stylesheets = "yes")
+
+# Check for man dependencies.
+AM_CONDITIONAL(BUILD_MAN,
+ test $ac_cv_prog_DOXYGEN = "yes" &&
+ test $ac_cv_prog_DOT = "yes")
+
+# Check for pdf/epub dependencies.
+AC_CHECK_PROG([DBLATEX], dblatex, yes, no)
+AC_CHECK_PROG([PDFLATEX], pdflatex, yes, no)
+AM_CONDITIONAL(BUILD_PDF,
+ test $ac_cv_prog_DBLATEX = "yes" &&
+ test $ac_cv_prog_PDFLATEX = "yes")
+
+AC_CHECK_PROG([RUBY], ruby, yes, no)
+AC_CHECK_PROG([DBTOEPUB], dbtoepubm, yes, no)
+AM_CONDITIONAL(BUILD_EPUB,
+ test $ac_cv_prog_RUBY = "yes" &&
+ test $ac_cv_prog_DBTOEPUB = "yes")
+
+
# Propagate the target-specific source directories through the build chain.
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
@@ -348,7 +401,7 @@
#AC_SUBST(GLIBCXX_IS_NATIVE)
#AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
GLIBCXX_EVALUATE_CONDITIONALS
-
+
AC_CACHE_SAVE
if test ${multilib} = yes; then
Index: doc/xml/images/confdeps.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: doc/xml/images/confdeps.dot
===================================================================
--- doc/xml/images/confdeps.dot (revision 168323)
+++ doc/xml/images/confdeps.dot (working copy)
@@ -7,8 +7,10 @@
"configure" -> "configure.ac";
"configure" -> "crossconfig.m4";
"configure" -> "linkage.m4";
+ "[*/]Makefile" -> "[*/]Makefile.in";
"[*/]Makefile.in" -> "Makefile.am";
"[*/]Makefile.in" -> "configure.ac";
+ "config.h" -> "config.h.in"
"config.h.in" -> "acconfig.h";
"config.h.in" -> "configure.ac";
}
Index: doc/xml/manual/build_hacking.xml
===================================================================
--- doc/xml/manual/build_hacking.xml (revision 168323)
+++ doc/xml/manual/build_hacking.xml (working copy)
@@ -46,7 +46,7 @@
<screen>
<inlinemediaobject>
<imageobject>
- <imagedata fileref="../images/confdeps.png"/>
+ <imagedata fileref="images/confdeps.png"/>
</imageobject>
<textobject>
<phrase>Dependency Graph Configure to Build Files</phrase>
Index: doc/Makefile.am
===================================================================
--- doc/Makefile.am (revision 168323)
+++ doc/Makefile.am (working copy)
@@ -24,90 +24,240 @@
# Documentation Overview
#
-# There are two main source materials for libstdc++ documentation.
+# 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 docbook markup in
+# 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.
+# A third and more obscure option deals with charting performance
+# tests, and should be considered experimental.
-# Default rules.
+# Documentation conditionals for output.
+if BUILD_XML
+STAMP_XML = doc-xml
+STAMP_INSTALL_XML = doc-install-xml
+else
+STAMP_XML =
+STAMP_INSTALL_XML =
+endif
+
+if BUILD_HTML
+STAMP_HTML = doc-html
+STAMP_INSTALL_HTML = doc-install-html
+else
+STAMP_HTML =
+STAMP_INSTALL_HTML =
+endif
+
+if BUILD_MAN
+STAMP_MAN = doc-man
+STAMP_INSTALL_MAN = doc-install-man
+else
+STAMP_MAN =
+STAMP_INSTALL_MAN =
+endif
+
+if BUILD_PDF
+STAMP_PDF = doc-pdf
+STAMP_INSTALL_PDF = doc-install-pdf
+else
+STAMP_PDF =
+STAMP_INSTALL_PDF =
+endif
+
+if BUILD_EPUB
+STAMP_EPUB = doc-epub
+STAMP_INSTALL_EPUB = doc-install-epub
+else
+STAMP_EPUB = doc-epub
+STAMP_INSTALL_EPUB = doc-install-epub
+endif
+
+# Documentation primary rules.
#
-# Point to best sub-rule for the requested documentation target,
-# create, and then copy into toplevel directory with standardized names
+# 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:
+
+
+# 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@"
+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}
+
# HTML
-doc-html: doc-html-docbook doc-html-doxygen
- cp -R ${docbook_outdir}/html ./libstdc++-manual.html
- cp -R ${doxygen_outdir}/html ./libstdc++-api.html
+htmldir="$(DESTDIR)@docdir@"
+stamp-html: stamp-html-docbook stamp-html-doxygen
+ $(STAMP) stamp-html
-# MAN
-doc-man: doc-man-doxygen
- cp -R ${doxygen_outdir}/man ./libstdc++-api.man
+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;
+
# PDF
-doc-pdf: doc-pdf-docbook doc-pdf-doxygen
- cp ${docbook_outdir}/pdf/libstdc++-manual.pdf .
- cp ${doxygen_outdir}/pdf/libstdc++-api.pdf .
+pdfdir="$(DESTDIR)@docdir@"
+stamp-pdf: stamp-pdf-docbook stamp-pdf-doxygen
+ $(STAMP) stamp-pdf
-# TEXINFO
-doc-texinfo: doc-texinfo-docbook
+doc-pdf: stamp-pdf
-# XML
-doc-xml: doc-xml-single-docbook doc-xml-single-doxygen
- cp ${manual_xml} .
- cp ${api_xml} .
+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}
+# MAN
+mandir="$(DESTDIR)@mandir@"
+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}
+
+# TEXINFO,INFO
+infodir="$(DESTDIR)@infodir@"
+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}
+
+# EPUB
+# Assumes ruby installed
+epubdir="$(DESTDIR)@docdir@"
+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 configuration
# 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
-doc-html-doxygen:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`cd ..; ${PWD_COMMAND}`; \
- ${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
+${doxygen_outdir}/xml:
+ mkdir -p ${doxygen_outdir}/xml
-doc-man-doxygen:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`cd ..; ${PWD_COMMAND}`; \
- ${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
+${doxygen_outdir}/html:
+ mkdir -p ${doxygen_outdir}/html
-doc-xml-doxygen:
+${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} ${doxygen_script} \
--host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
+ $(STAMP) stamp-xml-doxygen
-api_xml = ${doxygen_outdir}/xml/libstdc++-api-single.xml
-doc-xml-single-doxygen: doc-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-latex-doxygen:
+stamp-html-doxygen: ${doxygen_outdir}/html
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doxygen_script} \
+ --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
+ $(STAMP) stamp-html-doxygen
+
+stamp-latex-doxygen: ${doxygen_outdir}/latex
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${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.
-doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf
-api_pdf = ${doxygen_outdir}/pdf/libstdc++-api.pdf
-
-${doxygen_outdir}/pdf:
- mkdir -p ${doxygen_outdir}/pdf
-
-doc-pdf-doxygen: stamp-latex-doxygen ${doxygen_outdir}/pdf
+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 \
@@ -117,26 +267,23 @@
echo "... error"; \
exit 12; \
fi
-
-stamp-pdf-doxygen:
- @if [ ! -f stamp-pdf-doxygen ]; then \
- $(MAKE) doc-pdf-doxygen; \
- fi
$(STAMP) stamp-pdf-doxygen
-stamp-xml-doxygen:
- @if [ ! -f stamp-xml-doxygen ]; then \
- $(MAKE) doc-xml-doxygen; \
- $(MAKE) doc-xml-single-doxygen; \
- fi
- $(STAMP) stamp-xml-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
-stamp-latex-doxygen:
- @if [ ! -f stamp-latex-doxygen ]; then \
- $(MAKE) doc-latex-doxygen; \
- fi
- $(STAMP) stamp-latex-doxygen
+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
+
# Docbook configuration.
# Assumes
# libxslt
@@ -144,7 +291,6 @@
# pdflatex
# docbook-style-xsl
# emacs-nxml-mode
-# xmlto passivetex
docbook_outdir = ${glibcxx_builddir}/doc/docbook
xml_dir = ${glibcxx_srcdir}/doc/xml
@@ -220,12 +366,19 @@
XSLTPROC = xsltproc
XSLTPROC_FLAGS = --nonet --xinclude
+#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
+${docbook_outdir}/epub:
+ mkdir -p ${docbook_outdir}/epub
+
${docbook_outdir}/fo:
mkdir -p ${docbook_outdir}/fo
@@ -243,64 +396,108 @@
# Validate existing XML structure.
XMLLINT = xmllint
-#LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
-#LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
+#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 = $(LINT_FLAGS) $(SCHEMA_FLAGS)
+XMLLINT_FLAGS = --xinclude --nsclean --c14n --noent --noblanks --nocdata
+XMLLINT_VALID_FLAGS = $(LINT_FLAGS) $(SCHEMA_FLAGS)
doc-xml-validate-docbook: $(xml_sources)
@echo "Generating XML validation log..."
- $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+ $(XMLLINT) $(XMLLINT_VALID_FLAGS) ${top_srcdir}/doc/xml/spine.xml
# 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
-doc-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
+set_xml = ${docbook_outdir}/xml/libstdc++-set-single.xml
+stamp-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
@echo "Generating XML single..."
- $(XMLLINT) --xinclude --noent --noblanks --nocdata --nsclean --c14n \
- ${top_srcdir}/doc/xml/manual/spine.xml > ${manual_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-docbook: $(xml_sources) ${docbook_outdir}/html
+stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
+ $(STAMP) stamp-html-docbook
+doc-html-docbook: stamp-html-docbook
+
# HTML, all one page
manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
-doc-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
+stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html single file..."
$(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-docbook: $(xml_sources) ${docbook_outdir}/fo
+stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
@echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
+ $(STAMP) stamp-fo-docbook
+doc-fo-docbook: stamp-fo-docbook
+
# PDF, via dblatex
manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf
DBLATEX_FLAGS = --dump --verbose --pdf -o ${manual_pdf}
-doc-pdf-docbook: doc-pdf-dblatex-docbook
-
-doc-pdf-dblatex-docbook: $(xml_sources) ${docbook_outdir}/pdf
+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
-# Texinfo, via docbook2X
+doc-pdf-docbook: stamp-pdf-docbook
+
+# 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
-doc-texinfo-docbook: doc-xml-single-docbook ${docbook_outdir}/texinfo
+
+stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo
@echo "Generating texinfo files..."
- db2x_docbook2texi $(DB2TEXI_FLAGS) ${manual_xml}
+ 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
+
+# EPUB, via dbtoepub + ruby
+manual_epub = ${docbook_outdir}/epub/libstdc++-manual.epub
+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
+
+
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
@@ -316,8 +513,8 @@
.PHONY: doc-doxygen-html doc-doxygen-man doc-performance
# By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.log
+CLEANFILES = *.log stamp*
# To remove directories.
clean-local:
- rm -rf man html pdf fo xml doxygen docbook stamp* ./libstdc++-* db2t*
+ rm -rf man html pdf fo xml doxygen docbook ./libstdc++-* db2t*
Index: doc/doxygen/user.cfg.in
===================================================================
--- doc/doxygen/user.cfg.in (revision 168323)
+++ doc/doxygen/user.cfg.in (working copy)
@@ -1304,7 +1304,7 @@
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
-PDF_HYPERLINKS = YES
+PDF_HYPERLINKS = NO
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
Index: Makefile.am
===================================================================
--- Makefile.am (revision 168323)
+++ Makefile.am (working copy)
@@ -1,6 +1,6 @@
## Makefile for the toplevel directory of the GNU C++ Standard library.
##
-## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -26,19 +26,105 @@
if GLIBCXX_HOSTED
hosted_source = doc src po testsuite
endif
+
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
## Note that python must come after src.
SUBDIRS = include libsupc++ $(hosted_source) python
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-# Handy forwarding targets.
+# Testsuite/check forwarding targets.
check-%:
cd testsuite && $(MAKE) $@
+# Documentation forwarding targets.
doc-%:
cd doc && $(MAKE) $@
+# Documentation conditionals for output.
+if BUILD_XML
+STAMP_XML = doc-xml
+STAMP_INSTALL_XML = doc-install-xml
+else
+STAMP_XML =
+STAMP_INSTALL_XML =
+endif
+
+if BUILD_HTML
+STAMP_HTML = doc-html
+STAMP_INSTALL_HTML = doc-install-html
+else
+STAMP_HTML =
+STAMP_INSTALL_HTML =
+endif
+
+if BUILD_MAN
+STAMP_MAN = doc-man
+STAMP_INSTALL_MAN = doc-install-man
+else
+STAMP_MAN =
+STAMP_INSTALL_MAN =
+endif
+
+if BUILD_PDF
+STAMP_PDF = doc-pdf
+STAMP_INSTALL_PDF = doc-install-pdf
+else
+STAMP_PDF =
+STAMP_INSTALL_PDF =
+endif
+
+if BUILD_EPUB
+STAMP_EPUB = doc-epub
+STAMP_INSTALL_EPUB = doc-install-epub
+else
+STAMP_EPUB = doc-epub
+STAMP_INSTALL_EPUB = doc-install-epub
+endif
+
+# 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:
+
# Multilib support.
MAKEOVERRIDES=