forked from weld-project/weld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
50 lines (43 loc) · 1.02 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use std::process::Command;
use std::env;
fn main() {
let mut path = match env::var("WELD_HOME") {
Ok(val) => val,
Err(_) => ".".to_string(),
};
if path.chars().last().unwrap() != '/' {
path = path + &"/";
}
Command::new("make")
.arg("clean")
.arg("-C")
.arg("python/grizzly/")
.status()
.unwrap();
Command::new("make")
.arg("convertor")
.arg("-C")
.arg("python/grizzly/")
.status()
.unwrap();
Command::new("make")
.arg("clean")
.arg("-C")
.arg("weld_rt/cpp/")
.status()
.unwrap();
Command::new("make")
.arg("-C")
.arg("weld_rt/cpp/")
.status()
.unwrap();
// NOTE this is pretty hacky...better way?
let weldrt_path = path + &"weld_rt/Cargo.toml";
Command::new("cargo")
.arg("build")
.arg("--manifest-path")
.arg(weldrt_path.clone())
.arg("--release")
.status()
.unwrap();
}