Move Mako-related files into a new sub-directory.

There’s gonna be more of them.
This commit is contained in:
Simon Sapin 2016-04-18 16:16:57 +02:00
parent b7eb720c74
commit 7787b21e30
8 changed files with 10 additions and 6 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::env;
use std::path::Path;
use std::process::{Command, exit};
#[cfg(windows)]
@ -29,9 +30,12 @@ fn find_python() -> String {
fn main() {
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" };
let status = Command::new(python)
.args(&["generate_properties_rs.py", product, "rust"])
.arg(&script)
.arg(product)
.arg("rust")
.status()
.unwrap();
if !status.success() {

View file

@ -59,7 +59,7 @@ def write_html(template):
)
_, html = render("properties.html.mako", properties=properties)
doc_servo = os.path.join(BASE, "..", "..", "target", "doc", "servo")
doc_servo = os.path.join(BASE, "..", "..", "..", "target", "doc", "servo")
write(doc_servo, "css-properties.json", json.dumps(properties, indent=4))
write(doc_servo, "css-properties.html", html)