Thread (29 messages) 29 messages, 4 authors, 2025-06-20

Re: [PATCH v4 04/14] tools: ynl_gen_rst.py: make the index parser more generic

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Date: 2025-06-14 14:58:46
Also in: linux-doc, linux-kernel-mentees, lkml

Em Sat, 14 Jun 2025 14:41:29 +0100
Donald Hunter [off-list ref] escreveu:
On Sat, 14 Jun 2025 at 09:56, Mauro Carvalho Chehab
[off-list ref] wrote:
quoted
It is not a good practice to store build-generated files
inside $(srctree), as one may be using O=<BUILDDIR> and even
have the Kernel on a read-only directory.

Change the YAML generation for netlink files to allow it
to parse data based on the source or on the object tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 tools/net/ynl/pyynl/ynl_gen_rst.py | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)  
It looks like this patch is no longer required since this script
doesn't get run by `make htmldocs` any more.

Instead, I think there is cleanup work to remove unused code like
`generate_main_index_rst`
It is too early to drop it on this series, as only this patch:

	[PATCH v4 09/14] docs: use parser_yaml extension to handle Netlink specs

stops using it.
This whole script may be unnecessary now, unless we want a simple way
to run YnlDocGenerator separately from the main doc build.
It is up to you to keep or drop after patch 9. Yet, on my experiences with
kernel_doc.py and get_abi.py, it is a lot easier to test the parser via 
a simple command line script, without having Sphinx parallel build, complex
doc build logic and Sphinx exception handling in place.

My suggestion is to keep ynl_gen_rst.py, removing generate_main_index_rst
as a cleanup patch after patch 9.

Regards,
Mauro
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help