From 4c77015ed9c964603e193b31fb583b8adf31bea8 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 27 Jul 2018 16:01:14 +0200 Subject: [PATCH] protob: add combine makefile target for proto2js (which can't combine files by itself) --- protob/.gitignore | 1 + protob/Makefile | 5 +++++ 2 files changed, 6 insertions(+) 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