linux-loongson/rust
Miguel Ojeda 252fea131e rust: kbuild: clean output before running rustdoc
`rustdoc` can get confused when generating documentation into a folder
that contains generated files from other `rustdoc` versions.

For instance, running something like:

    rustup default 1.78.0
    make LLVM=1 rustdoc
    rustup default 1.88.0
    make LLVM=1 rustdoc

may generate errors like:

    error: couldn't generate documentation: invalid template: last line expected to start with a comment
      |
      = note: failed to create or modify "./Documentation/output/rust/rustdoc/src-files.js"

Thus just always clean the output folder before generating the
documentation -- we are anyway regenerating it every time the `rustdoc`
target gets called, at least for the time being.

Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Reported-by: Daniel Almeida <daniel.almeida@collabora.com>
Closes: https://rust-for-linux.zulipchat.com/#narrow/channel/288089/topic/x/near/527201113
Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Link: https://lore.kernel.org/r/20250726133435.2460085-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-08-12 21:10:50 +02:00
..
bindings Rust changes for v6.17 2025-08-03 13:49:10 -07:00
helpers Rust changes for v6.17 2025-08-03 13:49:10 -07:00
kernel Rust changes for v6.17 2025-08-03 13:49:10 -07:00
macros Rust changes for v6.17 2025-08-03 13:49:10 -07:00
pin-init pin-init changes for v6.17 2025-07-13 23:05:14 +02:00
uapi rust: enable clippy::ref_as_ptr lint 2025-06-22 23:09:32 +02:00
.gitignore
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
bindgen_parameters rust: map __kernel_size_t and friends also to usize/isize 2024-11-10 23:58:00 +01:00
build_error.rs
compiler_builtins.rs ARM: 9441/1: rust: Enable Rust support for ARMv7 2025-03-26 13:31:16 +00:00
exports.c rust: exports: improve grammar in commentary 2024-10-21 17:35:33 +02:00
ffi.rs rust: use absolute paths in macros referencing core and kernel 2025-05-23 00:12:14 +02:00
Makefile rust: kbuild: clean output before running rustdoc 2025-08-12 21:10:50 +02:00