From cdb141d138d857bd82b8223eb6f6c3b98fb11703 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 19 Oct 2016 12:03:50 -0700 Subject: [PATCH] Also rebuild if build.rs itself changes. We already have all the meta/**.py as dependencies. --- lib/cretonne/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cretonne/build.rs b/lib/cretonne/build.rs index 47e2890217..2067a37afd 100644 --- a/lib/cretonne/build.rs +++ b/lib/cretonne/build.rs @@ -23,6 +23,11 @@ fn main() { let cur_dir = env::current_dir().expect("Can't access current working directory"); let crate_dir = cur_dir.as_path(); + // Make sure we rebuild is this build script changes. + // I guess that won't happen if you have non-UTF8 bytes in your path names. + // The `build.py` script prints out its own dependencies. + println!("cargo:rerun-if-changed={}", crate_dir.join("build.rs").to_string_lossy()); + // Scripts are in `$crate_dir/meta`. let meta_dir = crate_dir.join("meta"); let build_script = meta_dir.join("build.py");