diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2019-07-26 21:54:42 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2019-07-29 17:37:03 +0200 |
commit | f1300bb98b0267b552a3f12e64e30f2f414213a3 (patch) | |
tree | 901681da27bf4d8733d205476c08963656555113 /components/script/build.rs | |
parent | 447ae1eae6e21017d2afd8d6b17a9f8ab889dd3f (diff) | |
download | servo-f1300bb98b0267b552a3f12e64e30f2f414213a3.tar.gz servo-f1300bb98b0267b552a3f12e64e30f2f414213a3.zip |
Auto-generate CSSStyleDeclaration.webidl for CSS properties based on the style crate
Diffstat (limited to 'components/script/build.rs')
-rw-r--r-- | components/script/build.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/script/build.rs b/components/script/build.rs index 1b8ed578387..1af9fbf7648 100644 --- a/components/script/build.rs +++ b/components/script/build.rs @@ -15,6 +15,13 @@ use std::time::Instant; fn main() { let start = Instant::now(); + let style_out_dir = PathBuf::from(env::var_os("DEP_SERVO_STYLE_CRATE_OUT_DIR").unwrap()); + let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + let build_dir = out_dir.join("build"); + let json = "css_properties.json"; + let _ = std::fs::create_dir(&build_dir); // Ignore errors: they most likely indicate it already exists + std::fs::copy(style_out_dir.join(json), build_dir.join(json)).unwrap(); + // This must use the Ninja generator -- it's the only one that // parallelizes cmake's output properly. (Cmake generates // separate makefiles, each of which try to build @@ -35,7 +42,7 @@ fn main() { start.elapsed().as_secs() ); - let json = PathBuf::from(env::var_os("OUT_DIR").unwrap()) + let json = out_dir .join("build") .join("InterfaceObjectMapData.json"); let json: Value = serde_json::from_reader(File::open(&json).unwrap()).unwrap(); |