[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d3f4c7ee-6351-4c6f-ae93-f423245c4c9e@gmail.com>
Date: Sun, 26 Oct 2025 00:14:23 +0900
From: Akira Yokosawa <akiyks@...il.com>
To: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: linux-kernel@...r.kernel.org, Randy Dunlap <rdunlap@...radead.org>,
Jani Nikula <jani.nikula@...ux.intel.com>, Akira Yokosawa <akiyks@...il.com>
Subject: Re: [PATCH v3 0/8] Collect documentation-related tools under
/tools/docs
On Fri, 24 Oct 2025 14:08:21 -0600, Jonathan Corbet wrote:
> Our documentation-related tools are spread out over various directories;
> several are buried in the scripts/ dumping ground. That makes them harder
> to discover and harder to maintain.
>
> Recent work has started accumulating our documentation-related tools in
> /tools/docs. This series completes that task, moving the rest of our
> various utilities there, hopefully fixing up all of the relevant references
> in the process.
>
> At the end, rather than move the old, Perl kernel-doc, I simply removed it.
>
> The big elephant lurking in this small room is the home for Python modules;
> I left them under scripts/lib, but that is an even less appropriate place
> than it was before. I would propose either tools/python or lib/python;
> thoughts on that matter welcome.
>
> Changes in v3:
> - Now with more caffeine! Properly based on docs-next.
:-) :-)
WRT the build error from test robot, it looks to me like we need these
final touches:
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 8e3df5db858e..fbd8e3ae23ea 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -582,7 +582,7 @@ pdf_documents = [
# kernel-doc extension configuration for running Sphinx directly (e.g. by Read
# the Docs). In a normal build, these are supplied from the Makefile via command
# line arguments.
-kerneldoc_bin = "../tools/docs/kernel-doc.py"
+kerneldoc_bin = "../tools/docs/kernel-doc"
kerneldoc_srctree = ".."
def setup(app):
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index 2586b4d4e494..3c815b40026b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -289,13 +289,8 @@ def setup_kfiles(app):
kerneldoc_bin = app.env.config.kerneldoc_bin
- if kerneldoc_bin and kerneldoc_bin.endswith("kernel-doc.py"):
- print("Using Python kernel-doc")
- out_style = RestFormat()
- kfiles = KernelFiles(out_style=out_style, logger=logger)
- else:
- print(f"Using {kerneldoc_bin}")
-
+ out_style = RestFormat()
+ kfiles = KernelFiles(out_style=out_style, logger=logger)
def setup(app):
app.add_config_value('kerneldoc_bin', None, 'env')
diff --git a/Makefile b/Makefile
index d6ff0af5cca6..33b1db1cc0cf 100644
--- a/Makefile
+++ b/Makefile
@@ -460,7 +460,7 @@ HOSTPKG_CONFIG = pkg-config
# the KERNELDOC macro needs to be exported, as scripts/Makefile.build
# has a logic to call it
-KERNELDOC = $(srctree)/tools/docs/kernel-doc.py
+KERNELDOC = $(srctree)/tools/docs/kernel-doc
export KERNELDOC
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
-----------------------------------------------------------------
The change in Documentation/sphinx/kerneldoc.py is needed because
kerneldoc_bin == ".../kernel-doc.py"
indicated loading it as python lib into the extension, while
kerneldoc_bin == ".../kernel-doc"
indicated invoking it as a script.
Now that we don't have kernel-doc.py, loading python lib looks to me
as a natural choice.
Mauro, what do you think?
Hope this helps,
Akira
Powered by blists - more mailing lists