Re: [PATCH v2 1/1] docs: makefile: move rustdoc check to the build wrapper

From: Jonathan Corbet

Date: Sat Nov 29 2025 - 10:46:39 EST


Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:

> The makefile logic to detect if rust is enabled is not working
> the way it was expected: instead of using the current setup
> for CONFIG_RUST, it uses a cached version from a previous build.
>
> The root cause is that the current logic inside docs/Makefile
> uses a cached version of CONFIG_RUST, from the last time a non
> documentation target was executed. That's perfectly fine for
> Sphinx build, as it doesn't need to read or depend on any
> CONFIG_*.
>
> So, instead of relying at the cache, move the logic to the
> wrapper script and let it check the current content of .config,
> to verify if CONFIG_RUST was selected.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
> ---
> Documentation/Makefile | 6 -----
> tools/docs/sphinx-build-wrapper | 41 +++++++++++++++++++++++++--------
> 2 files changed, 32 insertions(+), 15 deletions(-)

Applied, thanks.

jon