Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: error on GENERATE_COMPILATION_DATABASE=yes failure
The "GENERATE_COMPILATION_DATABASE=yes" option added in 3821c38 (Makefile: add support for generating JSON compilation database, 2020-09-03) positively asserts that you'd like to have a compilation database generated. If we can't generate the database because CC isn't clang, then we shouldn't suppress the errors the compiler itself emits. Doing so appears to have been done only because 3821c38 copy/pasted most of the code from the earlier "COMPUTE_HEADER_DEPENDENCIES=auto" added in 111ee18 (Makefile: Use computed header dependencies if the compiler supports it, 2011-08-18). In the "COMPUTE_HEADER_DEPENDENCIES" we'd like to be more graceful since we'll try to turn it on without the user asking, but as "GENERATE_COMPILATION_DATABASE=yes" is purely opt-in we shouldn't ignore STDERR on the user's behalf. So let's stop suppressing STDERR, and call $(error) instead of $(warning) if we fail here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Loading branch information