summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-02-03 19:15:03 -0300
committerHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-02-03 19:15:03 -0300
commit4c7e843fd08cd9ec1429c511cf1ab2e4c5250da7 (patch)
tree11e53734daa9e643fb3700128679e3b790a41899
parent9b5c09047361f3ec2cf18afbb6d1e03047a59778 (diff)
downloadale-4c7e843fd08cd9ec1429c511cf1ab2e4c5250da7.zip
Have c_parse_makefile look for GNUmakefile as well
Makefiles using GNU-make features might be called "GNUmakefile" instead of "Makefile". This commit teaches the `c_parse_makefile` feature to look for a GNUmakefile file if a Makefile is not present.
-rw-r--r--autoload/ale/c.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim
index c7b1e20a..946eeca4 100644
--- a/autoload/ale/c.vim
+++ b/autoload/ale/c.vim
@@ -506,6 +506,10 @@ function! ale#c#GetMakeCommand(buffer) abort
if s:CanParseMakefile(a:buffer)
let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile')
+ if empty(l:path)
+ let l:path = ale#path#FindNearestFile(a:buffer, 'GNUmakefile')
+ endif
+
if !empty(l:path)
let l:always_make = ale#Var(a:buffer, 'c_always_make')