///
/// This is currently used judiciously throughout the build system rather than
/// using a `Result` with `try!`, but this may change one day...
+#[macro_export]
macro_rules! t {
($e:expr) => {
match $e {
}
};
}
-pub(crate) use t;
+pub use t;
/// Given an executable called `name`, return the filename for the
/// executable for a particular target.
pub fn run(cmd: &mut Command, print_cmd_on_fail: bool) {
if !try_run(cmd, print_cmd_on_fail) {
- std::process::exit(1);
+ crate::detail_exit(1);
}
}
pub fn run_suppressed(cmd: &mut Command) {
if !try_run_suppressed(cmd) {
- std::process::exit(1);
+ crate::detail_exit(1);
}
}
fn fail(s: &str) -> ! {
eprintln!("\n\n{}\n\n", s);
- std::process::exit(1);
+ crate::detail_exit(1);
}
/// Copied from `std::path::absolute` until it stabilizes.