]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Exclude lists for doxygen API docs
authorBen Kaduk <kaduk@mit.edu>
Wed, 21 Nov 2012 16:31:06 +0000 (11:31 -0500)
committerBen Kaduk <kaduk@mit.edu>
Tue, 27 Nov 2012 22:52:54 +0000 (17:52 -0500)
Doxygen will pick up every function, macro, and typedef defined
in krb5.h; some of these may not actually be part of the public
API for one reason or another.  Provide hardcoded exclude lists
for macro/function/type names for which we do not want to emit
reStructuredText documentation, and check these lists when processing
the Doxygen XML output.

Seed these lists with the macros TRUE, FALSE, KRB5_OLD_CRYPTO,
KRB5_GENERAL__, KRB5_CALLCONV, KRB5_CALLCONV_C, KRB5_CALLCONV_WRONG,
KRB5INT_BEGIN_DECLS, KRB5INT_END_DECLS, and KRB5_ATTR_DEPRECATED,
and typedefs krb5_cc_ops and krb5_responder_context. The booleans
are compatibility cruft that we do not want to advertise, and the other
macros are for internal use for signalling and platform compatibility.
The typedefs are functioning just as forward declarations.

For consistency, remove KRB5_OLD_CRYPTO.rst from the macros index; it
had no content even when we did generate it.

ticket: 7447
tags: pullup
target_version: 1.11

doc/appdev/refs/macros/index.rst
doc/tools/doxybuilder_funcs.py
doc/tools/doxybuilder_types.py

index 94b824414601bdb1ec05eb1d893e2d3ccb22db5c..33dca06a6ee1e892c65d7e454ab6365246b615f0 100644 (file)
@@ -224,7 +224,6 @@ Public
    KRB5_NT_UNKNOWN.rst
    KRB5_NT_WELLKNOWN.rst
    KRB5_NT_X500_PRINCIPAL.rst
-   KRB5_OLD_CRYPTO.rst
    KRB5_PAC_CLIENT_INFO.rst
    KRB5_PAC_CREDENTIALS_INFO.rst
    KRB5_PAC_DELEGATION_INFO.rst
index 7e54750c8b4c150a63ac938e643fe3e337bf6f5c..b1ef8ac80576fb299d9570fd679be907a61477ac 100644 (file)
@@ -29,6 +29,8 @@ from xml.sax import make_parser
 from xml.sax.handler import ContentHandler
 from docmodel import *
 
+exclude_funcs = []
+
 class DocNode(object):
     """
     Represents the structure of xml node.
@@ -177,6 +179,8 @@ class DoxyFuncs(XML2AST):
             print 'not processing node: %s' % node_type
             return
 
+        if 'name' in data and data['name'] in exclude_funcs:
+            return
         self.objects.append(DocModel(**data))
 
     def save(self, templates, target_dir):
index c7a38f9d2c9e451d60cdf37b24a4d88d1eb45908..551f7d5f45080f70eb856b3f390dcc0495b71d65 100644 (file)
@@ -30,6 +30,11 @@ from lxml import etree
 
 from docmodel import *
 
+exclude_types = [ 'TRUE', 'FALSE', 'KRB5_ATTR_DEPRECATED',
+                  'KRB5_CALLCONV', 'KRB5_CALLCONV_C', 'KRB5_CALLCONV_WRONG',
+                  'KRB5_GENERAL__', 'KRB5_OLD_CRYPTO',
+                  'KRB5INT_BEGIN_DECLS', 'KRB5INT_END_DECLS',
+                  'krb5_cc_ops', 'krb5_responder_context' ]
 
 class DoxyTypes(object):
     def __init__(self, xmlpath):
@@ -85,6 +90,8 @@ class DoxyTypes(object):
                     data = self._process_variable_node(node)
                 elif kind == 'define':
                     data = self._process_define_node(node)
+                if 'name' in data and data['name'] in exclude_types:
+                    continue
                 result.append(data)
         print "\nnumber of types processed ==> " , len(result)
         return result