diff --git a/servo/components/servo/Cargo.lock b/servo/components/servo/Cargo.lock index 6a8b6adb69b2..16123ec93b6b 100644 --- a/servo/components/servo/Cargo.lock +++ b/servo/components/servo/Cargo.lock @@ -2134,6 +2134,7 @@ dependencies = [ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2391,6 +2392,15 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wayland-client" version = "0.5.11" diff --git a/servo/components/style/Cargo.toml b/servo/components/style/Cargo.toml index 9b0dd5b6632b..4b91a6edbc14 100644 --- a/servo/components/style/Cargo.toml +++ b/servo/components/style/Cargo.toml @@ -37,3 +37,6 @@ smallvec = "0.1" string_cache = {version = "0.2.12", features = ["heap_size"]} time = "0.1" url = {version = "1.0.0", features = ["heap_size"]} + +[build-dependencies] +walkdir = "0.1" diff --git a/servo/components/style/build.rs b/servo/components/style/build.rs index d5935bc2d810..0f824c498c87 100644 --- a/servo/components/style/build.rs +++ b/servo/components/style/build.rs @@ -2,9 +2,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +extern crate walkdir; + use std::env; use std::path::Path; use std::process::{Command, exit}; +use walkdir::WalkDir; #[cfg(windows)] fn find_python() -> String { @@ -29,6 +32,17 @@ fn find_python() -> String { } fn main() { + println!("cargo:rerun-if-changed=build.rs"); + for entry in WalkDir::new("properties") { + let entry = entry.unwrap(); + match entry.path().extension().and_then(|e| e.to_str()) { + Some("mako") | Some("rs") | Some("py") | Some("zip") => { + println!("cargo:rerun-if-changed={}", entry.path().display()); + } + _ => {} + } + } + let python = env::var("PYTHON").ok().unwrap_or_else(find_python); let script = Path::new(file!()).parent().unwrap().join("properties").join("build.py"); let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" }; diff --git a/servo/ports/cef/Cargo.lock b/servo/ports/cef/Cargo.lock index 8b9d1fe79ded..a6557bea351b 100644 --- a/servo/ports/cef/Cargo.lock +++ b/servo/ports/cef/Cargo.lock @@ -2024,6 +2024,7 @@ dependencies = [ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2252,6 +2253,15 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wayland-client" version = "0.5.11" diff --git a/servo/ports/geckolib/Cargo.lock b/servo/ports/geckolib/Cargo.lock index 51d8938dc201..37b1daf43b2b 100644 --- a/servo/ports/geckolib/Cargo.lock +++ b/servo/ports/geckolib/Cargo.lock @@ -543,6 +543,7 @@ dependencies = [ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -672,6 +673,15 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.6" diff --git a/servo/ports/gonk/Cargo.lock b/servo/ports/gonk/Cargo.lock index 5a0844146587..f0b23a3f3bfa 100644 --- a/servo/ports/gonk/Cargo.lock +++ b/servo/ports/gonk/Cargo.lock @@ -2010,6 +2010,7 @@ dependencies = [ "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2238,6 +2239,15 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wayland-client" version = "0.5.11"