Skip to content

Commit e70d972

Browse files
author
José Valim
committed
Check for proper Makefile when compiling on Windows, closes #4841
1 parent 3ce0296 commit e70d972

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/mix/lib/mix/tasks/deps.compile.ex

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,13 @@ defmodule Mix.Tasks.Deps.Compile do
184184
Mix.raise "\"#{manager}\" installation failed"
185185
end
186186

187-
defp do_make(dep, config) do
188-
command = if match?({:win32, _}, :os.type) and File.regular?("Makefile.win") do
189-
"nmake /F Makefile.win"
190-
else
191-
"make"
192-
end
187+
defp do_make(%{opts: opts} = dep, config) do
188+
command =
189+
if match?({:win32, _}, :os.type) and File.regular?(Path.join(opts[:dest], "Makefile.win")) do
190+
"nmake /F Makefile.win"
191+
else
192+
"make"
193+
end
193194
do_command(dep, config, command, true)
194195
end
195196

0 commit comments

Comments
 (0)