gettext: rebuild extract macro on env var change

While it's not necessary to rebuild the proc macro for extraction when
the env var controlling the output location changes, this way everything
using the macro will automatically be rebuilt when this env var changes,
making it impossible to forget adding this to other `build.rs` files.

For now, keeping the rebuild instructions in fish's main crate's
`build.rs` would be fine as well, but if we start breaking this crate
into smaller parts, it would become annoying to add the rebuild command
in every crate depending on gettext extraction.

Closes #12107
This commit is contained in:
Daniel Rainer
2025-11-25 00:36:12 +01:00
committed by Johannes Altmanninger
parent 4642b28ea7
commit 22a252d064
4 changed files with 7 additions and 3 deletions

View File

@@ -42,9 +42,6 @@ fn main() {
fish_build_helper::rebuild_if_embedded_path_changed("share");
#[cfg(feature = "gettext-extract")]
rsconf::rebuild_if_env_changed("FISH_GETTEXT_EXTRACTION_FILE");
let build = cc::Build::new();
let mut target = Target::new_from(build).unwrap();
// Keep verbose mode on until we've ironed out rust build script stuff