From 3aac7f9db9ee1973152426c097216e0071dd2293 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Tue, 8 Mar 2022 21:39:43 +0100 Subject: fix: prefer gmake over make --- lua/nvim-treesitter/shell_command_selectors.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index b0812198..e7de0955 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -94,7 +94,14 @@ function M.select_compiler_args(repo, compiler) end function M.select_compile_command(repo, cc, compile_location) - if string.match(cc, "cl$") or string.match(cc, "cl.exe$") or not repo.use_makefile or fn.has "win32" == 1 then + local make = M.select_executable { "gmake", "make" } + if + string.match(cc, "cl$") + or string.match(cc, "cl.exe$") + or not repo.use_makefile + or fn.has "win32" == 1 + or not make + then return { cmd = cc, info = "Compiling...", @@ -106,7 +113,7 @@ function M.select_compile_command(repo, cc, compile_location) } else return { - cmd = "make", + cmd = make, info = "Compiling...", err = "Error during compilation", opts = { -- cgit v1.2.3