aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-04-25 23:49:19 -0400
committerJesse Luehrs <doy@tozt.net>2016-04-25 23:49:19 -0400
commit0c22a51ab36f1c6b84796400a2c85dbb23b956fc (patch)
tree42b35e1bb2e0e0eb97fd28ae207f4e9a49de76b5 /build.rs
parent3ef17b959006d5fb122c1c8ea1d27e6aef222097 (diff)
downloadvt100-rust-0c22a51ab36f1c6b84796400a2c85dbb23b956fc.tar.gz
vt100-rust-0c22a51ab36f1c6b84796400a2c85dbb23b956fc.zip
add build script
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..14c4082
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,12 @@
+fn main() {
+ std::env::set_current_dir("libvt100")
+ .unwrap_or_else(|e| { panic!("failed to chdir: {}", e) });
+ let out = std::process::Command::new("make")
+ .arg("static")
+ .output()
+ .unwrap_or_else(|e| { panic!("failed to exec: {}", e) });
+ if !out.status.success() {
+ println!("{}", std::string::String::from_utf8_lossy(&out.stderr));
+ std::process::exit(out.status.code().unwrap_or(255));
+ }
+}