mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-04 18:27:36 +00:00
docs: use get_abi.py for ABI generation
Use the new script instead of the old one when generating ABI docs. For now, execute it via exec. Future changes will better integrate it by using the class defined there directly. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/e7fcb121c0612c94f6f54f0d742cd3a26a46cd7d.1739182025.git.mchehab+huawei@kernel.org
This commit is contained in:
committed by
Jonathan Corbet
parent
6b48bea168
commit
9d7ec88679
@@ -14,7 +14,7 @@ u"""
|
||||
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
|
||||
|
||||
The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the
|
||||
scripts/get_abi.pl script to parse the Kernel ABI files.
|
||||
scripts/get_abi.py script to parse the Kernel ABI files.
|
||||
|
||||
Overview of directive's argument and options.
|
||||
|
||||
@@ -67,7 +67,6 @@ class KernelCmd(Directive):
|
||||
|
||||
option_spec = {
|
||||
"debug" : directives.flag,
|
||||
"rst" : directives.unchanged
|
||||
}
|
||||
|
||||
def run(self):
|
||||
@@ -78,15 +77,12 @@ class KernelCmd(Directive):
|
||||
srctree = os.path.abspath(os.environ["srctree"])
|
||||
|
||||
args = [
|
||||
os.path.join(srctree, 'scripts/get_abi.pl'),
|
||||
os.path.join(srctree, 'scripts/get_abi.py'),
|
||||
'-D', os.path.join(srctree, 'Documentation', self.arguments[0]),
|
||||
'rest',
|
||||
'--enable-lineno',
|
||||
'--dir', os.path.join(srctree, 'Documentation', self.arguments[0]),
|
||||
]
|
||||
|
||||
if 'rst' in self.options:
|
||||
args.append('--rst-source')
|
||||
|
||||
lines = subprocess.check_output(args, cwd=os.path.dirname(doc.current_source)).decode('utf-8')
|
||||
nodeList = self.nestedParse(lines, self.arguments[0])
|
||||
return nodeList
|
||||
|
||||
Reference in New Issue
Block a user