From 489e224cb62f6b7b4f3f030323dc14bfdd888509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 7 Aug 2018 00:33:34 +0000 Subject: [PATCH] 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 --- components/style/build_gecko.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 68d160ab5e0..8387f6513a6 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -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()); + } } }