diff --git a/protob/.gitignore b/protob/.gitignore index 20e75334c9..ee30dc04a0 100644 --- a/protob/.gitignore +++ b/protob/.gitignore @@ -1,2 +1,3 @@ *.pb +combined.proto graph.gv* diff --git a/protob/Makefile b/protob/Makefile index e33b7b6857..ece6846b95 100644 --- a/protob/Makefile +++ b/protob/Makefile @@ -3,5 +3,10 @@ check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.p %.pb: %.proto protoc -I/usr/include -I. $< -o $@ +combine: + echo 'syntax = "proto2";' > combined.proto + echo 'import "google/protobuf/descriptor.proto";' >> combined.proto + grep -hv -e '^import ' -e '^syntax' -e 'option java_' messages*.proto >> combined.proto + clean: rm -f *.pb