glibmm r599 - in trunk: . docs/reference
- From: jjongsma svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r599 - in trunk: . docs/reference
- Date: Thu, 14 Feb 2008 02:54:43 +0000 (GMT)
Author: jjongsma
Date: Thu Feb 14 02:54:43 2008
New Revision: 599
URL: http://svn.gnome.org/viewvc/glibmm?rev=599&view=rev
Log:
* docs/reference/Doxyfile.in:
* docs/reference/Makefile.am:
* docs/reference/doxygen_to_devhelp.xsl: generate and install a devhelp book
for glibmm like we do for gtkmm. It would be nice to make the xsl
stylesheet general and shared between gtkmm and glibmm (and eventually other
libraries as well), but for now I just duplicated it here
Added:
trunk/docs/reference/doxygen_to_devhelp.xsl
Modified:
trunk/ChangeLog
trunk/docs/reference/ (props changed)
trunk/docs/reference/Doxyfile.in
trunk/docs/reference/Makefile.am
Modified: trunk/docs/reference/Doxyfile.in
==============================================================================
--- trunk/docs/reference/Doxyfile.in (original)
+++ trunk/docs/reference/Doxyfile.in Thu Feb 14 02:54:43 2008
@@ -773,7 +773,7 @@
# feature is still experimental and incomplete at the
# moment.
-GENERATE_XML = NO
+GENERATE_XML = YES
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
Modified: trunk/docs/reference/Makefile.am
==============================================================================
--- trunk/docs/reference/Makefile.am (original)
+++ trunk/docs/reference/Makefile.am Thu Feb 14 02:54:43 2008
@@ -3,14 +3,24 @@
beautify_docs_source = $(srcdir)/beautify_docs.pl.in
beautify_docs = $(srcdir)/beautify_docs.pl
+devhelp_file = glibmm-2.4.devhelp
+devhelp_stylesheet = doxygen_to_devhelp.xsl
+
include $(top_srcdir)/docs/Makefile_web.am_fragment
web_path_reference = $(web_path_docs)reference
EXTRA_DIST = README Doxyfile.in \
glibmm_header.html_fragment glibmm_footer.html_fragment beautify_docs.pl \
- html glibmm_doxygen_tags libstdc++.tag.xml
+ html glibmm_doxygen_tags libstdc++.tag.xml doxygen_to_devhelp.xsl $(devhelp_file)
#Ideally, libstdc++.tag.xml would be installed by gcc, instead of being copied into every project.
+# the xml output is made along with the html output
+xml/index.xml: html/index.html
+
+# Build a DevHelp reference from the doxygen xml
+$(devhelp_file): xml/index.xml $(devhelp_stylesheet)
+ xsltproc -o $@ $(devhelp_stylesheet) xml/index.xml
+
html/index.html: $(doxygen_configfile_source) $(beautify_docs_source) $(top_srcdir)/glib/glibmm/*.h
-rm -rf html
image_path=""; \
@@ -33,12 +43,15 @@
doc-clean:
-rm -rf html
+ -rm -rf xml
+ -rm -f $(devhelp_file)
-rm -f glibmm_doxygen_tags
-rm -f glibmm-reference-html.tar.gz glibmm-reference-html.tar.bz2
referencedir = $(gtkmm_docdir)/reference/html
+devhelpdir = $(datadir)/devhelp/books/glibmm-2.4
-install-reference: html/index.html
+install-reference: html/index.html $(devhelp_file)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(referencedir)
@dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.dot ; do \
@@ -46,6 +59,8 @@
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(referencedir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(referencedir)/$$f; \
done
+ $(mkinstalldirs) $(DESTDIR)$(devhelpdir)
+ $(INSTALL_DATA) $(srcdir)/$(devhelp_file) $(DESTDIR)$(devhelpdir)/$$f;
uninstall-reference: html/index.html
@$(NORMAL_UNINSTALL)
@@ -54,6 +69,7 @@
echo " rm -f $(DESTDIR)$(referencedir)/$$f"; \
rm -f $(DESTDIR)$(referencedir)/$$f; \
done
+ rm -f $(DESTDIR)$(devhelpdir)/$(devhelp_file)
# Install beautify_docs.pl, next to gmmproc.
gmmproc_bin_SCRIPTS = $(beautify_docs)
Added: trunk/docs/reference/doxygen_to_devhelp.xsl
==============================================================================
--- (empty file)
+++ trunk/docs/reference/doxygen_to_devhelp.xsl Thu Feb 14 02:54:43 2008
@@ -0,0 +1,94 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version="1.0">
+
+<xsl:output method="xml" version="1.0" indent="yes"/>
+
+<xsl:param name="reference_prefix">../../../doc/glibmm-2.4/docs/reference/html/</xsl:param>
+
+<xsl:template match="/">
+ <book title="glibmm 2.4 library Reference Manual"
+ name="glibmm 2.4"
+ link="{$reference_prefix}/index.html">
+ <chapters>
+ <sub name="Classes" link="{$reference_prefix}classes.html">
+ <xsl:apply-templates select="doxygenindex/compound[ kind='class']">
+ <xsl:sort select="."/>
+ </xsl:apply-templates>
+ </sub>
+ <sub name="Namespaces" link="{$reference_prefix}namespaces.html">
+ <xsl:apply-templates select="doxygenindex/compound[ kind='namespace']">
+ <xsl:sort select="."/>
+ </xsl:apply-templates>
+ </sub>
+ </chapters>
+
+ <functions>
+ <!-- @todo: maybe select only the real functions, ie those with kind=="function"? -->
+ <xsl:apply-templates select="doxygenindex/compound/member" mode="as-function"/>
+ </functions>
+ </book>
+</xsl:template>
+
+<xsl:template match="compound">
+ <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+ <xsl:param name="link"><xsl:value-of select="@refid"/>.html</xsl:param>
+ <sub name="{$name}" link="{$reference_prefix}{$link}">
+ <xsl:apply-templates select="member" mode="as-sub">
+ <xsl:sort select="."/>
+ </xsl:apply-templates>
+ </sub>
+</xsl:template>
+
+<xsl:template match="member" mode="as-function">
+ <!--
+ <function name="atk_set_value" link="atk-atkvalue.html#ATK-SET-VALUE"/>
+ -->
+ <xsl:variable name="fqn">
+ <xsl:call-template name="get-fully-qualified-name" />
+ </xsl:variable>
+ <xsl:variable name="link">
+ <xsl:call-template name="get-member-link" />
+ </xsl:variable>
+ <function name="{$fqn}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+<xsl:template match="member" mode="as-sub">
+ <xsl:variable name="fqn">
+ <xsl:call-template name="get-fully-qualified-name" />
+ </xsl:variable>
+ <xsl:variable name="link">
+ <xsl:call-template name="get-member-link" />
+ </xsl:variable>
+ <sub name="{$fqn}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+
+<!-- get a url link for the current member node.
+ The source xml looks like this:
+ <compound refid="classGtk_1_1AboutDialog" kind="class"><name>Gtk::AboutDialog</name>
+ <member refid="classGtk_1_1AboutDialog_1ad14950354fa1d9e7d02e951bd0f232e" kind="typedef"><name>SlotActivateLink</name></member>
+
+ The URL for the member function is obtained by adding '.html' to the refid of
+ the parent node. The in-page anchor id is the portion of the child's refid
+ that is different than the parent's refid, but without the leading '_1'
+ So, in the example above, the url would be:
+ classGtk_1_1AboutDialog.html#ad14950354fa1d9e7d02e951bd0f232e
+-->
+<xsl:template name="get-member-link">
+ <xsl:variable name="offset">
+ <xsl:value-of select="string-length(../@refid) + 3"/>
+ </xsl:variable>
+ <xsl:value-of select="concat(../@refid, '.html#', substring(@refid, $offset))"/>
+</xsl:template>
+
+<!-- Get the fully qualified name for the current class member node -->
+<xsl:template name="get-fully-qualified-name">
+ <xsl:value-of select="concat(../name, '::', name)"/>
+</xsl:template>
+
+</xsl:stylesheet>
+
+<!-- vim:ts=2 sw=2:
+-->
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]