mirror of
https://github.com/arabianq/build_msp.git
synced 2026-04-28 06:21:24 +00:00
fixed building on linux
This commit is contained in:
@@ -5,10 +5,22 @@ use std::path::Path;
|
|||||||
fn main() {
|
fn main() {
|
||||||
let switch_tools_dir = Path::new("switch-tools");
|
let switch_tools_dir = Path::new("switch-tools");
|
||||||
|
|
||||||
let autogen_status = Command::new("./autogen.sh")
|
let aclocal_status = Command::new("aclocal")
|
||||||
.current_dir(switch_tools_dir)
|
.current_dir(switch_tools_dir)
|
||||||
.status()
|
.status().
|
||||||
.expect("Couldn't run autogen.sh");
|
expect("Couldn't run aclocal");
|
||||||
|
|
||||||
|
let autoconf_status = Command::new("autoconf")
|
||||||
|
.current_dir(switch_tools_dir)
|
||||||
|
.status().
|
||||||
|
expect("Couldn't run autoconf");
|
||||||
|
|
||||||
|
let automake_status = Command::new("automake")
|
||||||
|
.current_dir(switch_tools_dir)
|
||||||
|
.arg("--add-missing")
|
||||||
|
.arg("-c")
|
||||||
|
.status().
|
||||||
|
expect("Couldn't run automake");
|
||||||
|
|
||||||
let conf_status = Command::new("./configure")
|
let conf_status = Command::new("./configure")
|
||||||
.current_dir(switch_tools_dir)
|
.current_dir(switch_tools_dir)
|
||||||
@@ -20,7 +32,9 @@ fn main() {
|
|||||||
.status()
|
.status()
|
||||||
.expect("Couldn't run make");
|
.expect("Couldn't run make");
|
||||||
|
|
||||||
if !autogen_status.success() || !conf_status.success() || !make_status.success() {
|
assert!(aclocal_status.success(), "Something went wrong while building switch-tools");
|
||||||
panic!("Something went wrong trying to build switch-tools");
|
assert!(autoconf_status.success(), "Something went wrong while building switch-tools");
|
||||||
}
|
assert!(automake_status.success(), "Something went wrong while building switch-tools");
|
||||||
|
assert!(conf_status.success(), "Something went wrong while building switch-tools");
|
||||||
|
assert!(make_status.success(), "Something went wrong while building switch-tools");
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user