From 996fff28aad216510e75e045a0d95832dd4fe893 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 25 Jan 2016 16:20:25 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20rebuild=20library=20when=20test?= =?UTF-8?q?s=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cargo’s default is to re-run build scripts (and therefore rebuild stuff) whenever any file changes. We can be more precise. --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 008de90b..b0146389 100644 --- a/build.rs +++ b/build.rs @@ -29,7 +29,9 @@ fn main() { named_entities_to_phf( &Path::new(&manifest_dir).join("data/entities.json"), - &Path::new(&env::var("OUT_DIR").unwrap()).join("named_entities.rs")) + &Path::new(&env::var("OUT_DIR").unwrap()).join("named_entities.rs")); + + println!("cargo:rerun-if-changed={}", rules_rs.display()); } #[cfg(feature = "codegen")]