Add broken doxygen namesoace handling workaround
g0dil [Thu, 21 Dec 2006 08:12:18 +0000 (08:12 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@170 270642c3-0616-0410-b53a-bc976706d245

senfscons/SatSCons.py
senfscons/tagmunge.xsl [new file with mode: 0644]

index 6c8bcc9..bed67e0 100644 (file)
@@ -160,6 +160,16 @@ def DoxyGlob(exclude=[]):
 
 def Doxygen(env, doxyfile="Doxyfile", extra_sources = []):
     docs = env.Doxygen(doxyfile)
+    # The last target is the (optional) tagfile
+    if os.path.basename(str(docs[-1])) != '.stamp':
+        # Postprocess the tag file to remove the (broken) namespace
+        # references
+        env.AddPostAction(
+            docs,
+            env.Action([ "xsltproc -o ${TARGETS[-1]}.temp %s ${TARGETS[-1]}"
+                         % os.path.join(basedir,"tagmunge.xsl"),
+                         "mv ${TARGETS[-1]}.temp ${TARGETS[-1]}" ]))
+        env.Clean(docs[-1],"$TARGET.temp")
     env.Depends(docs,extra_sources)
     env.Alias('all_docs', *docs)
     return docs
diff --git a/senfscons/tagmunge.xsl b/senfscons/tagmunge.xsl
new file mode 100644 (file)
index 0000000..67f1f3d
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+                version="1.0">\r
+  \r
+  <xsl:output method="xml"/>\r
+    \r
+  <xsl:template match="compound[@kind='namespace']">\r
+  </xsl:template>\r
+\r
+  <xsl:template match="*">\r
+    <xsl:copy>\r
+      <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
+      <xsl:apply-templates/>\r
+    </xsl:copy>\r
+  </xsl:template>\r
+\r
+</xsl:stylesheet>\r