Skip to content

Commit

Permalink
Merge pull request #3853 from kit-ty-kate/fix-gmake
Browse files Browse the repository at this point in the history
Fix %{make} on Windows
  • Loading branch information
rgrinberg authored Oct 14, 2020
2 parents 5cfd93b + 45732b8 commit 4a2f9ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Unreleased
installed and to be usable by other public libraries in the same project
(#3655, fixes #1017, @rgrinberg)

- Fix the `%{make}` variable on Windows by only checking for a `gmake` binary
on UNIX-like systems as a unrelated `gmake` binary might exist on Windows.
(#3853, @kit-ty-kate)

2.7.1 (2/09/2020)
-----------------

Expand Down
8 changes: 7 additions & 1 deletion src/stdune/bin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ let which ~path prog =
Option.some_if (exists fn) fn)

let make ~path =
match which ~path "gmake" with
let gmake =
if Sys.unix then
which ~path "gmake"
else
None
in
match gmake with
| None -> which ~path "make"
| some -> some

0 comments on commit 4a2f9ba

Please sign in to comment.