Makefile: Fix race that causes us to miss Protobuf changes
The check-proto
target gets executed as part of the verify
target by our CI to assert that code generated from our Protobuf
definitions matches the committed code and that it passes our linting
rules. But the former part to check for changes is racy: check-proto
depends on both proto
and no-proto-changes
in order to first
regenerate files and then check for changes. But if make(1) is executed
with multiple jobs these can run in parallel as no-proto-changes
does
not depend on proto
. Because executing git-diff(1) is faster than
generating the code the end result is that we don't ever notice
out-of-date code.
Fix this error by fixing the dependency chain so that no-proto-changes
depends on proto
.