Skip to content

Commit

Permalink
mk: Fix compile with makefiles
Browse files Browse the repository at this point in the history
A tweak was made to dependencies in rust-lang#38451 but the makefiles weren't updated to
accompany this. Instead of trying to integerate the `build_helper` crate into
the makefiles (which currently isn't present) this commit takes the approach of
just duplicating the required logic, which should be small enough for now.
  • Loading branch information
alexcrichton authored and brson committed Jan 19, 2017
1 parent d0aee60 commit 48f2b2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/tools/compiletest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ build = "build.rs"
log = "0.3"
env_logger = { version = "0.3.5", default-features = false }
serialize = { path = "../../libserialize" }
build_helper = { path = "../../build_helper" }
13 changes: 10 additions & 3 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

extern crate build_helper;

use common::Config;
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
use common::{Codegen, DebugInfoLldb, DebugInfoGdb, Rustdoc, CodegenUnits};
Expand Down Expand Up @@ -2110,7 +2108,16 @@ actual:\n\
}
self.create_dir_racy(&tmpdir);

let mut cmd = Command::new(build_helper::make(&self.config.host));
let host = &self.config.host;
let make = if host.contains("bitrig") || host.contains("dragonfly") ||
host.contains("freebsd") || host.contains("netbsd") ||
host.contains("openbsd") {
"gmake"
} else {
"make"
};

let mut cmd = Command::new(make);
cmd.current_dir(&self.testpaths.file)
.env("TARGET", &self.config.target)
.env("PYTHON", &self.config.docck_python)
Expand Down

0 comments on commit 48f2b2c

Please sign in to comment.