From c8719fbff562179643794ecb40048a5f9b7f8d2c Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 12 Feb 2025 17:01:54 +0100 Subject: [PATCH] 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). --- build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.rs b/build.rs index fe85285bd..d59389164 100644 --- a/build.rs +++ b/build.rs @@ -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)