Skip to content

Commit

Permalink
Compile go capnproto with intermediate file
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Michaelis <code@mgjm.de>
  • Loading branch information
mgjm committed Jul 11, 2023
1 parent 2e2fd0c commit 880e0b7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ $(GOTOOLS_BINDIR)/zeitgeist:
clean:
rm -rf target/

update-proto:
.INTERMEDIATE: internal/proto/conmon.capnp
internal/proto/conmon.capnp:
cat $(PROTO_PATH)/conmon.capnp $(PROTO_PATH)/go-patch > $@

update-proto: internal/proto/conmon.capnp
go install capnproto.org/go/capnp/v3/capnpc-go@latest
cat $(PROTO_PATH)/go-patch >> $(PROTO_PATH)/conmon.capnp
capnp compile \
-I$$GOPATH/src/capnproto.org/go/capnp/std \
-ogo $(PROTO_PATH)/conmon.capnp
mv $(PROTO_PATH)/conmon.capnp.go internal/proto/
git checkout $(PROTO_PATH)/conmon.capnp
-ogo internal/proto/conmon.capnp

.PHONY: lint lint-go lint-rust clean unit integration update-proto

Expand Down

0 comments on commit 880e0b7

Please sign in to comment.