From d540e525050a48311bf3308878940766797989a8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 21 Apr 2013 14:18:12 +0000 Subject: Add partially complete Doxygen-to-Docbook transform. --- .../HV1/lufa_docbook_transform.xsl | 198 ++++++ LUFA/StudioIntegration/HV1/transform_base.xsl | 737 +++++++++++++++++++++ LUFA/StudioIntegration/makefile | 8 +- 3 files changed, 941 insertions(+), 2 deletions(-) create mode 100644 LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl create mode 100644 LUFA/StudioIntegration/HV1/transform_base.xsl (limited to 'LUFA/StudioIntegration') diff --git a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl new file mode 100644 index 000000000..0da97ca23 --- /dev/null +++ b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl @@ -0,0 +1,198 @@ + + + + + + + + + + + LUFA Library + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="$book.title"/> + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="$top.level.page/title"/> + + + + + + + + + + +
+ + <xsl:value-of select="title"/> + + + + + + +
+
+ + + + + + +
+ + <xsl:value-of select="."/> + + + + + + images/ + + + +
+
+ + + + + + +
+ + + + + + + + <xsl:value-of select="title"/> + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/LUFA/StudioIntegration/HV1/transform_base.xsl b/LUFA/StudioIntegration/HV1/transform_base.xsl new file mode 100644 index 000000000..03b7901b6 --- /dev/null +++ b/LUFA/StudioIntegration/HV1/transform_base.xsl @@ -0,0 +1,737 @@ + + + + + + + + +
+ Variable and Type Definitions + + +
+ + <xsl:value-of select="header"/> + + + + +
+
+
+
+ + +
+ Structure Definitions + + + + +
+
+ + +
+ Macro Definitions + + +
+ + <xsl:value-of select="header"/> + + + + +
+
+
+
+ + +
+ Function Definitions + + +
+ + <xsl:value-of select="header"/> + + + + +
+
+
+
+ + +
+ Enumeration Definitions + + +
+
+ +
+ + + + + + +
+ + <xsl:choose> + <xsl:when test="@kind = 'struct'"> + <xsl:text>Struct </xsl:text> + </xsl:when> + <xsl:when test="@kind = 'union'"> + <xsl:text>Union </xsl:text> + </xsl:when> + </xsl:choose> + + <xsl:value-of select="compoundname"/> + + + + + + + + + + Type + Name + Description + + + + + + + + + + + + [] + + + + + + + + + + +   + +
+
+ + +
+ Function <xsl:value-of select="name"/>() + + + + + + + + + + + + + + + +   +
+
+ + +
+ Enum <xsl:value-of select="name"/> + + + + + + + + Enum Value + Description + + + + + + + + + + + + + + + + + + + +   +
+
+ + +
+ Macro <xsl:value-of select="name"/> + + + #define + + + ( + + + , + + + + ) + + + + + + \ + + + + + + + +   +
+
+ + +
+ + <!-- Doxygen gets confused and thinks function pointer type definitions + are variables, so we need to map them to this common section and + check the definition to see which of the two it is. --> + <xsl:choose> + <xsl:when test="contains(definition,'typedef')"> + <xsl:text>Type </xsl:text> + </xsl:when> + + <xsl:otherwise> + <xsl:text>Variable </xsl:text> + </xsl:otherwise> + </xsl:choose> + + <xsl:value-of select="name"/> + + + + + + + + +   +
+
+ + + + + + + + + + + + + + + + + + + + Warning + + + + + + + Returns + + + + + + + Precondition + + + + + + + + <xsl:value-of select="title"/> + + + + + + + + See also + + + + + + + + + + + + todo + To Do + + + + tip + Tip + + + + info + Info + + + + result + Result + + + + execute + Execute + + + + warning + Warning + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parameters + + + + Data Direction + Parameter Name + Description + + + + + + + + + + +
+
+ + + + Return Values + + + + Return Value + Description + + + + + + + + + + +
+
+ + + + + + + + ? + + + [] + + + + + + + + + + + + + + + + + + + + + + +
+ + <xsl:value-of select="title"/> + + + + +
+
+ + +
+ + <xsl:value-of select="title"/> + + + + +
+
+ + +
+ + <xsl:value-of select="title"/> + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ® + + + + © + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="caption"/> + + +
+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + <xsl:value-of select="."/> + + + + + + html/ + + + +
+
+ + + + + + + + + + + + +
+ + <xsl:value-of select="ancestor::*/title"/> + + + + + + + .svg + + + + +
+
+ + + + + + , + + + + + +
diff --git a/LUFA/StudioIntegration/makefile b/LUFA/StudioIntegration/makefile index 5b50a2221..daaa2dccd 100644 --- a/LUFA/StudioIntegration/makefile +++ b/LUFA/StudioIntegration/makefile @@ -40,6 +40,10 @@ VSIX_ASSETS := $(LUFA_ROOT)/DoxygenPages/Images/LUFA_thumb.png \ Blob/Atmel.Studio.Services.Interfaces.dll \ Blob/LUFA.dll \ Blob/LUFA.pkgdef +MSHELP_GEN_PARAMS := --stringparam generate.toc "book toc" \ + --stringparam chunk.quietly "1" \ + --stringparam chunk.section.depth "2" \ + --stringparam chunk.first.sections "1" all: generate_xml check_filenames generate_vsix @@ -79,11 +83,11 @@ $(MSHELP_OUTPUT_XML): $(DOXYGEN_COMBINED_XML) @echo Converting Doxygen XML to Docbook... @-mkdir mshelp 2> /dev/null @xsltproc HV1/lufa_docbook_transform.xsl $(DOXYGEN_COMBINED_XML) > mshelp/lufa_docbook.xml - @cd mshelp && xsltproc ../Docbook/mshelp/docbook.xsl lufa_docbook.xml + @cd mshelp && xsltproc $(MSHELP_GEN_PARAMS) ../Docbook/mshelp/docbook.xsl lufa_docbook.xml @echo Copying help assets... @-mkdir mshelp/images 2> /dev/null - @cp -r $(LUFA_ROOT)/DoxygenPages/Images/* mshelp/images + @cp `find $(LUFA_ROOT)/DoxygenPages/Images -type f` mshelp/images @echo Archiving help content... @cd mshelp && zip ../$(MSHELP_OUTPUT_XML) -q -0 -r *.html images -- cgit v1.2.3