Rebuild if share/ or doc_src/ changed

Because these are embedded in the fish binary,
we need to rebuild fish once they're changed.

This is only for release builds,
because rust-embed only really embeds in those
(debug builds read from the filesystem).
This commit is contained in:
Fabian Boehm
2025-02-12 17:01:54 +01:00
parent 2a1c5b18e8
commit c8719fbff5

View File

@@ -56,6 +56,13 @@ fn main() {
}
rsconf::rebuild_if_paths_changed(&["src", "printf", "Cargo.toml", "Cargo.lock", "build.rs"]);
// These are necessary if built with embedded functions,
// but only in release builds (because rust-embed in debug builds reads from the filesystem).
#[cfg(feature = "installable")]
#[cfg(not(debug_assertions))]
rsconf::rebuild_if_paths_changed(&["doc_src", "share"]);
cc::Build::new()
.file("src/libc.c")
.include(build_dir)