diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-05 12:26:40 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-09 10:56:09 +0300 |
commit | f9ec40319b076f5e50f6ca0e381d1e9e83e0af5e (patch) | |
tree | 4c11aa77e32bf437ee33496c06991dd435f7d55b | |
parent | 56c901febc2dbfc498d7998cc9229c438ffc7370 (diff) |
Makefile: Fix protoc compiler always being considered out-of-date
The rule which provides our protoc compiler simply unzips the static
protoc archive into the correct place. But unzip will set the
modification time of unzipped files to their original creation date,
which currently is July 28th 2020. As a result, the protoc executable
will always be older than its "protoc.zip" dependency and thus cause
make(1) to consider it out-of-date.
Fix the issue by passing `-DD`, which suppresses restoration of file and
directory mtimes.
-rw-r--r-- | Makefile | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -464,8 +464,7 @@ ${TOOLS_DIR}/protoc.zip: ${TOOLS_DIR}/protoc.version ${PROTOC}: ${TOOLS_DIR}/protoc.zip ${Q}rm -rf ${TOOLS_DIR}/protoc - ${Q}mkdir -p ${TOOLS_DIR}/protoc - cd ${TOOLS_DIR}/protoc && unzip ${TOOLS_DIR}/protoc.zip + ${Q}unzip -DD -q -d ${TOOLS_DIR}/protoc ${TOOLS_DIR}/protoc.zip # We're using per-tool go.mod files in order to avoid conflicts in the graph in # case we used a single go.mod file for all tools. |