Skip to content

Commit

Permalink
Only run the build script if something changed.
Browse files Browse the repository at this point in the history
I agree to license my contributions to each file under the terms
given at the top of each file I changed.
  • Loading branch information
weiznich authored and briansmith committed Mar 6, 2017
1 parent 5a50c3c commit f72d7c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ fn build_unix(target_info: &TargetInfo, out_dir: PathBuf) {
"stdc++"
};
println!("cargo:rustc-flags=-l dylib={}", libcxx);
print_rerun();
}


Expand Down Expand Up @@ -686,3 +687,22 @@ fn walk_dir<F>(dir: &Path, cb: &F)
}
}
}

fn print_rerun() {
for s in RING_ARM_SHARED_SRCS.iter()
.chain(RING_SRC.iter())
.chain(RING_TEST_SRCS.iter())
.chain(RING_AARCH64_SRCS.iter())
.chain(RING_ARM_SRCS.iter())
.chain(RING_X86_64_SRC.iter())
.chain(RING_X86_SRCS.iter())
.chain(RING_INTEL_SHARED_SRCS.iter())
.chain(RING_PPC_SRCS.iter())
.chain(RING_HEADERS.iter())
.chain(RING_TEST_HEADERS.iter())
.chain(RING_PERL_INCLUDES.iter())
.chain(RING_INLINE_FILES.iter()) {
println!("cargo:rerun-if-changed={}", s);
}
println!("cargo:rerun-if-changed=build.rs");
}

0 comments on commit f72d7c4

Please sign in to comment.