-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #503 from Freax13/enhancement/libmstpm-cleanup
various improvements to libmstpm
- Loading branch information
Showing
5 changed files
with
30 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,27 @@ | |
// | ||
// Authors: Claudio Carvalho <[email protected]> | ||
|
||
use std::env::current_dir; | ||
use std::process::Command; | ||
use std::process::Stdio; | ||
|
||
fn main() { | ||
let output = Command::new("make") | ||
// Build libmstpm. | ||
let status = Command::new("make") | ||
.stdout(Stdio::inherit()) | ||
.stderr(Stdio::inherit()) | ||
.output() | ||
.status() | ||
.unwrap(); | ||
assert!(status.success()); | ||
|
||
if !output.status.success() { | ||
panic!(); | ||
} | ||
// Tell cargo to link libmstpm and where to find it. | ||
let out_dir = std::env::var("OUT_DIR").unwrap(); | ||
println!("cargo:rustc-link-search={out_dir}"); | ||
println!("cargo:rustc-link-lib=mstpm"); | ||
|
||
// Tell cargo not to rerun the build-script unless anything in this | ||
// directory changes. | ||
let cwd = current_dir().unwrap(); | ||
let cwd = cwd.as_os_str().to_str().unwrap(); | ||
println!("cargo:rerun-if-changed={cwd}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters