Skip to content

Makefile: Fix overzealous rebuilds of protoc compiler

Patrick Steinhardt requested to merge pks-makefile-protoc into master

This fixes two problems which caused us to always rebuild the protoc compiler:

  • The protoc.zip file was always re-downloaded whenever the Makefile changed. This has been fixed by introducing a protoc.version file, similar to git.version and libgit2.version.
  • The protoc compile was always considered out-of-date because unzip retains modification time of when the archive has originally been created. Thus, the compiler is always older than protoc.zip, causing us to always rebuild the protoc target.

These issues have been annoying me for long enough now: Because my system is based on musl libc, the protobuf compiler as provided by the archive doesn't work. And thus every rebuild required manual action on my side to copy the correct protobuf compiler from my self-compiled version into the target location.

Merge request reports