Also rebuild if build.rs itself changes.

We already have all the meta/**.py as dependencies.
This commit is contained in:
Jakob Stoklund Olesen
2016-10-19 12:03:50 -07:00
parent a5913e6489
commit cdb141d138

View File

@@ -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");