mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
fix: prefer gmake over make
This commit is contained in:
parent
b8129fac90
commit
3aac7f9db9
1 changed files with 9 additions and 2 deletions
|
|
@ -94,7 +94,14 @@ function M.select_compiler_args(repo, compiler)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.select_compile_command(repo, cc, compile_location)
|
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 {
|
return {
|
||||||
cmd = cc,
|
cmd = cc,
|
||||||
info = "Compiling...",
|
info = "Compiling...",
|
||||||
|
|
@ -106,7 +113,7 @@ function M.select_compile_command(repo, cc, compile_location)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return {
|
return {
|
||||||
cmd = "make",
|
cmd = make,
|
||||||
info = "Compiling...",
|
info = "Compiling...",
|
||||||
err = "Error during compilation",
|
err = "Error during compilation",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue