From 87ddca66bdc7944df5375ebf6a3ffa42b084f911 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Wed, 2 Mar 2016 18:55:55 +0300 Subject: [PATCH] Autodetect mingw32-make --- hererocks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hererocks.py b/hererocks.py index cbc08f5..ae6da51 100755 --- a/hererocks.py +++ b/hererocks.py @@ -29,7 +29,7 @@ temp_dir = None platform_to_lua_target = { "linux": "linux", - "win": "cl" if os.name == "nt" or distutils.spawn.find_executable("cl") else "mingw", + "win": "cl" if os.name == "nt" and distutils.spawn.find_executable("cl") else "mingw", "darwin": "macosx", "freebsd": "freebsd" } @@ -645,7 +645,10 @@ class LuaJIT(Lua): run_command("msvcbuild.bat") os.chdir("..") else: - run_command("make" if opts.cflags is None else "make XCFLAGS=" + quote(opts.cflags)) + make = "mingw32-make" if ( + opts.target == "mingw" and + distutils.spawn.find_executable("mingw32-make")) else "make" + run_command(make if opts.cflags is None else make + " XCFLAGS=" + quote(opts.cflags)) def make_install(self): luajit_file = exe("luajit")