build: correctly express how to build .pb.go files

We can't do something generic but we don't have to. Let's use a grouped
rule.
This commit is contained in:
Vincent Bernat
2025-08-22 21:17:10 +02:00
parent 04cec32cee
commit 01c93fb2e3

View File

@@ -70,8 +70,7 @@ BUF = ./bin/external-tool buf
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
common/pb/rawflow_vtproto.pb.go: | common/pb/rawflow.pb.go common/pb/rawflow.pb.go common/pb/rawflow_vtproto.pb.go &: buf.gen.yaml common/pb/rawflow.proto ; $(info $(M) compiling protocol buffers $@…)
%.pb.go: buf.gen.yaml %.proto ; $(info $(M) compiling protocol buffers $@…)
$Q $(BUF) generate --path $(@:.pb.go=.proto) $Q $(BUF) generate --path $(@:.pb.go=.proto)
common/clickhousedb/mocks/mock_driver.go: go.mod ; $(info $(M) generate mocks for ClickHouse driver) common/clickhousedb/mocks/mock_driver.go: go.mod ; $(info $(M) generate mocks for ClickHouse driver)