[PATCH 0/4] tools/docs: sphinx-build-wrapper: avoid spurious rust docs generation

Thomas Weißschuh posted 4 patches 3 weeks ago
tools/docs/sphinx-build-wrapper | 80 +++++++++++++++++++++--------------------
1 file changed, 41 insertions(+), 39 deletions(-)
[PATCH 0/4] tools/docs: sphinx-build-wrapper: avoid spurious rust docs generation
Posted by Thomas Weißschuh 3 weeks ago
Currently the rust docs are generated for each entry of SPHINXDIRS,
even those not mentioning the rust directory.

Only generate the rust docs only once and only when requested.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (4):
      tools/docs: sphinx-build-wrapper: generate rust docs only once
      tools/docs: sphinx-build-wrapper: make 'rustdoc' a local variable
      tools/docs: sphinx-build-wrapper: compute sphinxdirs_list earlier
      tools/docs: sphinx-build-wrapper: only generate rust docs when requested

 tools/docs/sphinx-build-wrapper | 80 +++++++++++++++++++++--------------------
 1 file changed, 41 insertions(+), 39 deletions(-)
---
base-commit: e1a8301cd941b8029893500e6857d7978873483f
change-id: 20260117-docs-spurious-rust-8ffa2748925c

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH 0/4] tools/docs: sphinx-build-wrapper: avoid spurious rust docs generation
Posted by Jonathan Corbet 2 weeks, 2 days ago
Thomas Weißschuh <linux@weissschuh.net> writes:

> Currently the rust docs are generated for each entry of SPHINXDIRS,
> even those not mentioning the rust directory.
>
> Only generate the rust docs only once and only when requested.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Thomas Weißschuh (4):
>       tools/docs: sphinx-build-wrapper: generate rust docs only once
>       tools/docs: sphinx-build-wrapper: make 'rustdoc' a local variable
>       tools/docs: sphinx-build-wrapper: compute sphinxdirs_list earlier
>       tools/docs: sphinx-build-wrapper: only generate rust docs when requested
>
>  tools/docs/sphinx-build-wrapper | 80 +++++++++++++++++++++--------------------
>  1 file changed, 41 insertions(+), 39 deletions(-)

Applied, thanks.

jon
Re: [PATCH 0/4] tools/docs: sphinx-build-wrapper: avoid spurious rust docs generation
Posted by Mauro Carvalho Chehab 2 weeks, 4 days ago
On Sun, 18 Jan 2026 00:26:20 +0100
Thomas Weißschuh <linux@weissschuh.net> wrote:

> Currently the rust docs are generated for each entry of SPHINXDIRS,
> even those not mentioning the rust directory.
> 
> Only generate the rust docs only once and only when requested.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Thomas Weißschuh (4):
>       tools/docs: sphinx-build-wrapper: generate rust docs only once
>       tools/docs: sphinx-build-wrapper: make 'rustdoc' a local variable
>       tools/docs: sphinx-build-wrapper: compute sphinxdirs_list earlier
>       tools/docs: sphinx-build-wrapper: only generate rust docs when requested
> 
>  tools/docs/sphinx-build-wrapper | 80 +++++++++++++++++++++--------------------
>  1 file changed, 41 insertions(+), 39 deletions(-)

Patches in this series look ok. Code reviewed and I also did some
tests, and all LGTM.

So, for this series:

[mchehab: tested building with and without config RUST, doing
 a full build and also passing --sphinxdirs rust peci and just
 --sphinxdirs rust]

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Thanks,
Mauro