diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-04-29 10:39:28 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-05-10 23:41:19 -0700 |
| commit | 8d65591cf249a64bffa14ed49cb196af4eabac3c (patch) | |
| tree | 45a17a4c8bc538307cd7072ddfd7537146ed4bd3 /src/liballoc_jemalloc | |
| parent | 80ec1b9f1040fba67846924234167feeb24d1f68 (diff) | |
| download | rust-8d65591cf249a64bffa14ed49cb196af4eabac3c.tar.gz rust-8d65591cf249a64bffa14ed49cb196af4eabac3c.zip | |
rustbuild: Tighten dependencies of build scripts
Ensure that `rerun-if-changed` is printed for all build scripts to ensure that they've all got the right list of dependencies.
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index 5d521913b48..33a675331ab 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![deny(warnings)] + extern crate build_helper; extern crate gcc; @@ -18,6 +20,7 @@ use build_helper::run; fn main() { println!("cargo:rustc-cfg=cargobuild"); + println!("cargo:rerun-if-changed=build.rs"); let target = env::var("TARGET").unwrap(); let host = env::var("HOST").unwrap(); @@ -40,6 +43,19 @@ fn main() { let cflags = compiler.args().iter().map(|s| s.to_str().unwrap()) .collect::<Vec<_>>().join(" "); + let mut stack = src_dir.join("../jemalloc") + .read_dir().unwrap() + .map(|e| e.unwrap()) + .collect::<Vec<_>>(); + while let Some(entry) = stack.pop() { + let path = entry.path(); + if entry.file_type().unwrap().is_dir() { + stack.extend(path.read_dir().unwrap().map(|e| e.unwrap())); + } else { + println!("cargo:rerun-if-changed={}", path.display()); + } + } + let mut cmd = Command::new("sh"); cmd.arg(src_dir.join("../jemalloc/configure").to_str().unwrap() .replace("C:\\", "/c/") |
