]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation/sphinx: add support for specifying extra export files
authorJani Nikula <jani.nikula@intel.com>
Tue, 7 Jun 2016 09:13:56 +0000 (12:13 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 10 Jun 2016 13:46:55 +0000 (16:46 +0300)
commit510cda62b089f07e5e9360b8aa033cc7207e2626
tree82f4957e9757b67e4db8b98edcc7db1ffb6e3000
parenteabff36332160fe95384622f9690d0af2ad4efc9
Documentation/sphinx: add support for specifying extra export files

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: Jani Nikula <jani.nikula@intel.com>
Documentation/sphinx/kernel-doc.py