]> sigrok.org Git - libsigrok.git/commitdiff
bindings: Fix doc extraction for enums
authorMarcus Comstedt <redacted>
Sun, 8 Nov 2015 16:37:34 +0000 (17:37 +0100)
committerUwe Hermann <redacted>
Thu, 3 Dec 2015 21:01:21 +0000 (22:01 +0100)
The source file enum.hpp was not found when not building in the source
tree.  Also, extraction of the brief description did not work correctly
when there was additional XML markup inside the <para> element.

bindings/cxx/Doxyfile
bindings/swig/doc.py

index 8008db2fba1e9fe7199e631b38649e84cb59c5c7..7fb0854f91c361745da82f9c2b2b5eb720263414 100644 (file)
@@ -744,7 +744,7 @@ WARN_LOGFILE           =
 # Note: If this tag is empty the current directory is searched.
 
 INPUT                  = include/libsigrokcxx/libsigrokcxx.hpp \
-                         include/libsigrokcxx/enums.hpp
+                         $(BUILDDIR)include/libsigrokcxx/enums.hpp
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
index b9e20ade83c70be13a8bab8c686f5816e9a83da9..f71493d4d69993a81246970d6241a94a4e3cd6b2 100644 (file)
@@ -30,7 +30,7 @@ index = ElementTree.parse(input_file)
 
 def get_text(node):
     paras = node.findall('para')
-    return str.join('\n\n', [p.text.rstrip() for p in paras if p.text])
+    return str.join('\n\n', [("".join(l)).rstrip() for l in [list(p.itertext()) for p in paras] if l])
 
 for compound in index.findall('compound'):
     if compound.attrib['kind'] != 'class':