summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2020-08-29 16:05:49 +0100
committerw0rp <devw0rp@gmail.com>2020-08-29 16:05:49 +0100
commit7e0cdb53ecf9c94bb8777a57de8bf2aacca46b5d (patch)
treeed3a73c3128f80dd96e5f9409a64fdb1c4183226 /autoload
parentbc3a843e102d4490b2476b53531807ab624417e7 (diff)
downloadale-7e0cdb53ecf9c94bb8777a57de8bf2aacca46b5d.zip
Fix #3247 - Use --always-make for make -n by default
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/c.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim
index d0a4fa06..cff53125 100644
--- a/autoload/ale/c.vim
+++ b/autoload/ale/c.vim
@@ -2,7 +2,9 @@
" Description: Functions for integrating with C-family linters.
call ale#Set('c_parse_makefile', 0)
+call ale#Set('c_always_make', has('unix') && !has('macunix'))
call ale#Set('c_parse_compile_commands', 1)
+
let s:sep = has('win32') ? '\' : '/'
" Set just so tests can override it.
@@ -504,7 +506,10 @@ function! ale#c#GetMakeCommand(buffer) abort
let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile')
if !empty(l:path)
- return ale#path#CdString(fnamemodify(l:path, ':h')) . 'make -n'
+ let l:always_make = ale#Var(a:buffer, 'c_always_make')
+
+ return ale#path#CdString(fnamemodify(l:path, ':h'))
+ \ . 'make -n' . (l:always_make ? ' --always-make' : '')
endif
endif