Skip to content

Commit

Permalink
style: Don't print rerun-if-changed files until binding generation ha…
Browse files Browse the repository at this point in the history
…s succeeded.

Otherwise they may clobber useful output.

Differential Revision: https://phabricator.services.mozilla.com/D2783
  • Loading branch information
emilio committed Aug 7, 2018
1 parent 87deddb commit 489e224
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/style/build_gecko.rs
Expand Up @@ -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) {
Expand Down Expand Up @@ -286,6 +285,7 @@ mod bindings {
);
},
};

for fixup in fixups.iter() {
result = Regex::new(&fixup.pat)
.unwrap()
Expand Down Expand Up @@ -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());
}
}
}

Expand Down

0 comments on commit 489e224

Please sign in to comment.