1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

Merge pull request #6677 from samueltardieu/change-detection

Do not rebuild the build script unless necessary
This commit is contained in:
Sylvestre Ledru 2024-09-03 22:19:03 +02:00 committed by GitHub
commit 1707b9d4f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,10 @@ pub fn main() {
const FEATURE_PREFIX: &str = "feat_";
const OVERRIDE_PREFIX: &str = "uu_";
// Do not rebuild build script unless the script itself or the enabled features are modified
// See <https://doc.rust-lang.org/cargo/reference/build-scripts.html#change-detection>
println!("cargo:rerun-if-changed=build.rs");
if let Ok(profile) = env::var("PROFILE") {
println!("cargo:rustc-cfg=build={profile:?}");
}