We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0313adc commit 9a1e906Copy full SHA for 9a1e906
libgit2-sys/build.rs
@@ -182,6 +182,10 @@ fn main() {
182
println!("cargo:rustc-link-lib=framework=Security");
183
println!("cargo:rustc-link-lib=framework=CoreFoundation");
184
}
185
+
186
+ rerun_if(Path::new("libgit2/include"));
187
+ rerun_if(Path::new("libgit2/src"));
188
+ rerun_if(Path::new("libgit2/deps"));
189
190
191
fn cp_r(from: impl AsRef<Path>, to: impl AsRef<Path>) {
@@ -214,3 +218,13 @@ fn add_c_files(build: &mut cc::Build, path: impl AsRef<Path>) {
214
218
215
219
216
220
221
222
+fn rerun_if(path: &Path) {
223
+ if path.is_dir() {
224
+ for entry in fs::read_dir(path).expect("read_dir") {
225
+ rerun_if(&entry.expect("entry").path());
226
+ }
227
+ } else {
228
+ println!("cargo:rerun-if-changed={}", path.display());
229
230
+}
0 commit comments