lkml.org 
[lkml]   [2019]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] docs: sphinx: Add support :nosymbols: to exclude specific symbols
Date
Add :nosymbols: so that documentation of symbols can be organized in the
final output of makedocs. For example, files that define a large number
of symbols may want to categorize their symbols. Another example is
SGX, which introduces a uapi header that defines structs for ioctls and
for a new vDSO function[1]. Ideally, the documentation for the vDSO
struct will be placed into a different section.

[1] https://lkml.kernel.org/r/20190320162119.4469-25-jarkko.sakkinen@linux.intel.com

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
Documentation/sphinx/kerneldoc.py | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index c52b6caac356..d1eb1907858b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -48,6 +48,7 @@ class KernelDocDirective(Directive):
option_spec = {
'doc': directives.unchanged_required,
'functions': directives.unchanged,
+ 'nosymbols': directives.unchanged,
'export': directives.unchanged,
'internal': directives.unchanged,
}
@@ -81,6 +82,10 @@ class KernelDocDirective(Directive):
cmd += ['-symbol', f]
else:
cmd += ['-no-doc-sections']
+ elif 'nosymbols' in self.options:
+ symbols = self.options.get('nosymbols').split()
+ for s in symbols:
+ cmd += ['-nosymbol', s]

for pattern in export_file_patterns:
for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
--
2.21.0
\
 
 \ /
  Last update: 2019-04-05 23:46    [W:0.158 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site