Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Fix build on *BSD - use "gmake" #18

Merged
merged 1 commit into from
Dec 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sass-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ fn get_libsass_folder() -> PathBuf {
fn compile() {
let target = env::var("TARGET").expect("TARGET not found");
let src = get_libsass_folder();
let r = Command::new("make").current_dir(&src).output().expect("error running make");
let is_bsd = target.contains("dragonfly") || target.contains("freebsd") ||
target.contains("netbsd") || target.contains("openbsd");
let r = Command::new(if is_bsd { "gmake" } else { "make" }).current_dir(&src).
output().expect("error running make");

if !r.status.success() {
let err = String::from_utf8_lossy(&r.stderr);
Expand Down