]> Gentwo Git Trees - linux/.git/commit
docs: makefile: move rustdoc check to the build wrapper
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 21 Nov 2025 11:05:28 +0000 (12:05 +0100)
committerJonathan Corbet <corbet@lwn.net>
Sat, 29 Nov 2025 15:42:53 +0000 (08:42 -0700)
commit464257baf99200d1be1c053f15aa617056361e81
treeb8a51b668100439ddeec1271fdac9d9c7ebaf193
parentb9a565b3e4d852d8af14f2c4be0b1dc45f0884b6
docs: makefile: move rustdoc check to the build wrapper

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@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c06b1834ef02099735c13ee1109fa2a2b9e47795.1763722971.git.mchehab+huawei@kernel.org>
Documentation/Makefile
tools/docs/sphinx-build-wrapper