Added a small documentation build system

This commit is contained in:
maniacbug 2011-03-19 13:14:07 -07:00
parent 0503017d1a
commit 0b89d37f19
2 changed files with 96 additions and 0 deletions

42
Jamfile Normal file
View File

@ -0,0 +1,42 @@
#
# Jamfile for generating the documentation
#
DOXYGEN = doxygen ;
XSLT = xsltproc ;
DOCSOURCES = Doxyfile RF24.h ;
rule Doxygen
{
Depends $(<) : $(>) ;
Clean clean : $(<) ;
Depends docs : $(<) ;
}
actions Doxygen
{
$(DOXYGEN)
}
rule Xslt
{
Depends $(<) : $(>) ;
Clean clean : $(<) ;
}
actions Xslt
{
$(XSLT) $(STYLESHEET) $(>) > $(<)
}
Doxygen docs/xml/index.xml : $(DOCSOURCES) ;
Xslt docs/xml/combined.xml : docs/xml/index.xml ;
STYLESHEET on docs/xml/combined.xml = docs/xml/combine.xslt ;
Depends combined : docs/xml/combined.xml ;
Xslt docs/xml/wikidocs.txt : docs/xml/combined.xml ;
STYLESHEET on docs/xml/wikidocs.txt = wikidoc.xslt ;
Depends docs/xml/combined.xml : wikidoc.xslt ;
Depends wiki : docs/xml/wikidocs.txt ;

54
wikidoc.xslt Normal file
View File

@ -0,0 +1,54 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" standalone="yes" />
<xsl:template match="/">
<xsl:apply-templates select="//sectiondef[@kind='public-func']/memberdef[@kind='function']" />
</xsl:template>
<xsl:template match="memberdef">
<!-- xsl:text>&#xA;=== </xsl:text><xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/><xsl:text> ===&#xA;</xsl:text -->
<xsl:text>&#xA;=== </xsl:text><xsl:value-of select="name"/><xsl:text> ===&#xA;</xsl:text>
<xsl:apply-templates select="briefdescription"/>
<xsl:if test="count(detaileddescription/para[not(./*)]) &lt; 1"><xsl:text>&#xA;</xsl:text></xsl:if>
<xsl:apply-templates select="detaileddescription"/>
</xsl:template>
<xsl:template match="briefdescription/para">''<xsl:value-of select="."/>'' </xsl:template>
<xsl:template match="detaileddescription/para/parameterlist">
Parameters:
<xsl:apply-templates select="parameteritem"/>
</xsl:template>
<xsl:template match="parameteritem">* ''<xsl:value-of select="parameternamelist/parametername"/>'': <xsl:value-of select="parameterdescription/para"/><xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para[not(./*)]">
<xsl:value-of select="."/><xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/simplesect[@kind='return']/para">
Returns:
* <xsl:value-of select="."/><xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/simplesect[@kind='warning']/para">Warning: <xsl:value-of select="."/><xsl:text>&#xa;</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/programlisting">
<xsl:text>&#xa;&lt;pre&gt;&#xa;</xsl:text><xsl:apply-templates select="codeline"/><xsl:text>&lt;/pre&gt;&#xa;</xsl:text>
</xsl:template>
<xsl:template match="codeline">
<xsl:value-of select="."/><xsl:text>&#xa;</xsl:text>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
<!--
//compounddef[kind=class]
//sectiondef[kind=public-func]
type
definition
argsstring
briefdescription/para
detaileddescription/para
parameterlist
parametername
parameterdescription
simplesect[kind=return]
simplesect[kind=warning]
-->