style: Don't print rerun-if-changed files until binding generation has succeeded.

Otherwise they may clobber useful output.

Differential Revision: https://phabricator.services.mozilla.com/D2783
This commit is contained in:
Emilio Cobos Álvarez 2018-08-07 00:33:34 +00:00
parent 87deddb631
commit 489e224cb6
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -120,7 +120,6 @@ mod bindings {
let mut file = File::open(&path).unwrap();
let mut content = String::new();
file.read_to_string(&mut content).unwrap();
println!("cargo:rerun-if-changed={}", path.to_str().unwrap());
added_paths.insert(path);
// Find all includes and add them recursively
for cap in INCLUDE_RE.captures_iter(&content) {
@ -286,6 +285,7 @@ mod bindings {
);
},
};
for fixup in fixups.iter() {
result = Regex::new(&fixup.pat)
.unwrap()
@ -602,6 +602,10 @@ mod bindings {
generate_bindings(),
generate_atoms(),
}
for path in ADDED_PATHS.lock().unwrap().iter() {
println!("cargo:rerun-if-changed={}", path.to_str().unwrap());
}
}
}