From a4d6af0764899d21bc74ca3b6f8244f789729cf4 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 26 Mar 2015 10:59:54 +0100 Subject: [PATCH] Update build.rs. --- build.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/build.rs b/build.rs index 126b751ee..a00752974 100644 --- a/build.rs +++ b/build.rs @@ -2,19 +2,17 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#![feature(io)] - -use std::old_io::process::{Command, ProcessExit, StdioContainer}; -use std::os; +use std::env; +use std::process::{Command, Stdio}; fn main() { - let out_dir = os::getenv("OUT_DIR").unwrap(); + let out_dir = env::var("OUT_DIR").unwrap(); let result = Command::new("make") .args(&["-f", "makefile.cargo"]) - .stdout(StdioContainer::InheritFd(1)) - .stderr(StdioContainer::InheritFd(2)) + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) .status() .unwrap(); - assert_eq!(result, ProcessExit::ExitStatus(0)); + assert!(result.success()); println!("cargo:rustc-flags=-L native={}", out_dir); }