diff options
author | Sébastien Marie <semarie@users.noreply.github.com> | 2016-12-17 20:09:23 +0100 |
---|---|---|
committer | Sébastien Marie <semarie@users.noreply.github.com> | 2016-12-17 20:09:23 +0100 |
commit | a7d9025e40a55d5d8ddeb2f35075512055c363ca (patch) | |
tree | c410d5cae8e2d0b192415fed520e7dafa90e00b3 /src/build_helper | |
parent | 9f8c1e28a5c7e042c6522f84a684ad848a200c30 (diff) | |
download | rust-a7d9025e40a55d5d8ddeb2f35075512055c363ca.tar.gz |
let BSD to use gmake for GNU-make
the diff extends build_helper to provide an function to return the
expected name of GNU-make on the host: "make" or "gmake".
Fixes #38429
Diffstat (limited to 'src/build_helper')
-rw-r--r-- | src/build_helper/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs index bd036fae689..d0d588f46a7 100644 --- a/src/build_helper/lib.rs +++ b/src/build_helper/lib.rs @@ -63,6 +63,16 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> { } } +pub fn make(host: &str) -> PathBuf { + if host.contains("bitrig") || host.contains("dragonfly") || + host.contains("freebsd") || host.contains("netbsd") || + host.contains("openbsd") { + PathBuf::from("gmake") + } else { + PathBuf::from("make") + } +} + pub fn output(cmd: &mut Command) -> String { let output = match cmd.stderr(Stdio::inherit()).output() { Ok(status) => status, |