From a7d9025e40a55d5d8ddeb2f35075512055c363ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Sat, 17 Dec 2016 20:09:23 +0100 Subject: 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 --- src/build_helper/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/build_helper') 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 { } } +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, -- cgit v1.2.1