Added a small documentation build system
This commit is contained in:
parent
0503017d1a
commit
0b89d37f19
|
@ -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 ;
|
|
@ -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>
=== </xsl:text><xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/><xsl:text> ===
</xsl:text -->
|
||||
<xsl:text>
=== </xsl:text><xsl:value-of select="name"/><xsl:text> ===
</xsl:text>
|
||||
<xsl:apply-templates select="briefdescription"/>
|
||||
<xsl:if test="count(detaileddescription/para[not(./*)]) < 1"><xsl:text>
</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>
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="detaileddescription/para[not(./*)]">
|
||||
<xsl:value-of select="."/><xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="detaileddescription/para/simplesect[@kind='return']/para">
|
||||
Returns:
|
||||
* <xsl:value-of select="."/><xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="detaileddescription/para/simplesect[@kind='warning']/para">Warning: <xsl:value-of select="."/><xsl:text>
</xsl:text>
|
||||
|
||||
</xsl:template>
|
||||
<xsl:template match="detaileddescription/para/programlisting">
|
||||
<xsl:text>
<pre>
</xsl:text><xsl:apply-templates select="codeline"/><xsl:text></pre>
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="codeline">
|
||||
<xsl:value-of select="."/><xsl:text>
</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]
|
||||
|
||||
-->
|
Loading…
Reference in New Issue