Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}

Renaming the variable helped make sure I looked at every use.
This commit is contained in:
Simon Sapin 2019-07-25 19:39:32 +02:00
parent f1300bb98b
commit ddb4e369dd
52 changed files with 870 additions and 469 deletions

View file

@ -89,14 +89,19 @@ fn generate_properties() {
let script = Path::new(&env::var_os("CARGO_MANIFEST_DIR").unwrap())
.join("properties")
.join("build.py");
let product = if cfg!(feature = "gecko") {
"gecko"
} else {
"servo"
};
#[cfg(feature = "gecko")]
let engine = "gecko";
#[cfg(feature = "servo-layout-2013")]
let engine = "servo-2013";
#[cfg(feature = "servo-layout-2020")]
let engine = "servo-2020";
let status = Command::new(&*PYTHON)
.arg(&script)
.arg(product)
.arg(engine)
.arg("style-crate")
.status()
.unwrap();
@ -117,6 +122,9 @@ fn main() {
feature flags at the same time."
);
}
if gecko && (cfg!(feature = "servo-layout-2013") || cfg!(feature = "servo-layout-2020")) {
panic!("The 'servo-layout-*' features can only be enabled together with 'servo'.");
}
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:out_dir={}", env::var("OUT_DIR").unwrap());
generate_properties();