From dfbbbef684ea53806e22b47015102d698ba0c2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 25 Jun 2020 00:54:20 +0200 Subject: [PATCH] Add Makefile for protobuf bindings --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..db56eb2 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +hbase_tmp_path := /tmp/hbase +bindings_path := $(CURDIR)/protobuf + +all: + @echo Generating Python Protobuf bindings from HBase source + -mkdir $(bindings_path) + -git clone --depth 1 https://github.com/apache/hbase $(hbase_tmp_path) + cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \ + protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) * + cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \ + protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) client/* + cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \ + protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/* + cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \ + protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/io/* + cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \ + protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/zookeeper/* + + +clean: + rm -rf $(hbase_tmp_path) + rm -rf $(bindings_path)