diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 7133667b060..74e5ed636ca 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -2135,6 +2135,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]] @@ -2392,6 +2393,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/components/style/Cargo.toml b/components/style/Cargo.toml index 9b0dd5b6632..4b91a6edbc1 100644 --- a/components/style/Cargo.toml +++ b/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/components/style/build.rs b/components/style/build.rs index d5935bc2d81..0f824c498c8 100644 --- a/components/style/build.rs +++ b/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/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 772eb535b75..f2ae7eadd47 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -2029,6 +2029,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]] @@ -2257,6 +2258,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/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index 617a8a508cd..99c1c346243 100644 --- a/ports/geckolib/Cargo.lock +++ b/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]] @@ -673,6 +674,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/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 86b35f91723..8354cabf1b4 100644 --- a/ports/gonk/Cargo.lock +++ b/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"