]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: use get_abi.py for ABI generation
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 10 Feb 2025 10:18:01 +0000 (11:18 +0100)
committerJonathan Corbet <corbet@lwn.net>
Mon, 10 Feb 2025 18:19:56 +0000 (11:19 -0700)
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
Documentation/admin-guide/abi-obsolete.rst
Documentation/admin-guide/abi-removed.rst
Documentation/admin-guide/abi-stable.rst
Documentation/admin-guide/abi-testing.rst
Documentation/sphinx/kernel_abi.py

index b655615917f1e9415fce84d33aedd7be09c21e83..6d4d9ab7b8c3daabbbcbbbefdf1ea78a120afd08 100644 (file)
@@ -10,4 +10,3 @@ The description of the interface will document the reason why it is
 obsolete and when it can be expected to be removed.
 
 .. kernel-abi:: ABI/obsolete
-   :rst:
index ba941c1af178401f95a540d83eb2b37e7931ebfd..9fc78af6f0771ec43466f8b22140e0bed3740801 100644 (file)
@@ -4,4 +4,3 @@ ABI removed symbols
 ===================
 
 .. kernel-abi:: ABI/removed
-   :rst:
index 5d738f345333ec9b6e1d853b54f6244d79b79e99..c47c2a295865b96bd4dade73db3b1da4c7cc2d85 100644 (file)
@@ -13,4 +13,3 @@ Most interfaces (like syscalls) are expected to never change and always
 be available.
 
 .. kernel-abi:: ABI/stable
-   :rst:
index a867e6578bf7d3cc376266dae62ffd52e93007d5..40b31985e5874b41f437b388e1691416f375b815 100644 (file)
@@ -19,4 +19,3 @@ name to the description of these interfaces, so that the kernel
 developers can easily notify them if any changes occur.
 
 .. kernel-abi:: ABI/testing
-   :rst:
index 38653f5706c0fb62daebb51643074e51078dbf3c..f314b888d3dec1e053de91911ea9e7c5f48759c1 100644 (file)
@@ -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