• Jani Nikula's avatar
    Documentation/sphinx: add support for specifying extra export files · 03d35d9e
    Jani Nikula authored
    Let the user specify file patterns where to look for the EXPORT_SYMBOLs
    in addition to the file with kernel-doc comments. This is directly based
    on the -export-file FILE option added to kernel-doc in "kernel-doc: add
    support for specifying extra files for EXPORT_SYMBOLs", but we extend
    that with globbing patterns in the Sphinx extension.
    
    The file patterns are added as options to the :export: and :internal:
    arguments of the kernel-doc directive. For example, to extract the
    documentation of exported functions from include/net/mac80211.h:
    
    .. kernel-doc:: include/net/mac80211.h
       :export: net/mac80211/*.c
    
    Without the file pattern, no exported functions would be found, as the
    EXPORT_SYMBOLs are placed in the various source files under
    net/mac80211.
    
    The matched files are also added as dependencies on the document in
    Sphinx, as they may affect the output. This is one of the reasons to do
    the globbing in the Sphinx extension instead of in scripts/kernel-doc.
    
    The file pattern remains optional, and is not needed if the kernel-doc
    comments and EXPORT_SYMBOLs are placed in the source file passed in as
    the main argument to the kernel-doc directive. This is the most common
    case across the kernel source tree.
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    03d35d9e
kernel-doc.py 5.17 KB