"make warn" to print compilation warnings; "make lint" runs incrementally #649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses #588, allowing you to do
make warnto see all the compiler warnings printed during compilation of C files (really anything that your compiler sent to STDERR, which with gcc is nothing unless you have compiler warnings or errors). It's implemented by sending all STDERR output to another file ending withwarnings.txt(still printing these warnings immediately after compilation even if you never runmake warn) and then concatenating all these warning files into a single summary file afterwards. If your code successfully compiles without any warnings (i.e. the warning summary file is empty) you should see make happily printmake: Nothing to be done 'warn'whenmake warnis run again; otherwise the warnings will be printed every timemake warnis run (but without recompiling).In the second commit, I made lint behave in a similar way, producing a per-file lint report and then concatenating the outputs into a summary lint report. This way lint runs very fast if you run "make lint", change just one source file, and then run "make lint" again -- this is because it's only invoked for the changed file rather than again for the entire codebase.