diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2022-03-08 21:39:43 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-03-08 21:49:18 +0100 |
| commit | 3aac7f9db9ee1973152426c097216e0071dd2293 (patch) | |
| tree | 700c01c8c9722dff4b46f9821eaa96d637793b7f /lua | |
| parent | Revert "2612: Use gmake when available" (diff) | |
| download | nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar.gz nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar.bz2 nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar.lz nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar.xz nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.tar.zst nvim-treesitter-3aac7f9db9ee1973152426c097216e0071dd2293.zip | |
fix: prefer gmake over make
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/shell_command_selectors.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index b08121981..e7de09552 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 = { |
