My question could fairly be a duplicate of this, but I hope I'm making it critically different by asking about :make
ing Vim itself and having a meaningful quickfix window. (In reality, my use case is that of building my codebase, but if I can't get :make
doing the right thing for Vim, what's the point of wandering?)
I would have expected that running :make
in Vim's repo would result in an empty quickfix window (no errors, as no errors, is what I get if I compile in the terminal via make
).
But instead, it looks like the qf is populated with several lines of the output, even if none of them represents an error. In the screencast below, indeed, I use :cnext
to move from "error" 1 of 16 (at time 00:10) to 16 of 16 (at time 00:28) and they all look like a piece of the output, e.g.
(11 of 16): make[2]: Nothing to be done for 'first'.
So the first part of the question is why does :make
populate the qf window with non-error-nor-warning items?
When there is indeed a compilation error (e.g. in the screencast below, at time 00:40, I've removed a {
of the AutoPatCmd_S
struct, thus making the file erroneous, and run :make
again, at time 00:44), :cnext
eventually brings me in an object file (at time 1:15 onward), which I also suspect is not particularly useful.
What settings do I need to make Vim do the right thing as far as the qf for errors of :make
is concerned?
:help 'makeprg'
is set tomake
, then there is no intrinsic difference between being called via:make
,:!make
, or$ make
. There can be some extrinsic differences like environment variables or aliases but that's all. It's justmake
.