[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190405214453.18768-5-sean.j.christopherson@intel.com>
Date: Fri, 5 Apr 2019 14:44:53 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Jonathan Corbet <corbet@....net>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 4/4] docs: sphinx: Add support :nosymbols: to exclude specific symbols
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@...el.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
Powered by blists - more mailing lists