Skip to content

Commit 8b47010

Browse files
committed
add vendor/Makefile
1 parent d8939ac commit 8b47010

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

vendor/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Makefile for generating vendor packages
2+
3+
.PHONY: all clean fb303 hive-metastore
4+
5+
all: fb303 hive-metastore
6+
7+
# FB303 Thrift client generation
8+
fb303:
9+
rm -f /tmp/fb303.thrift
10+
rm -rf fb303
11+
curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/fb303.thrift
12+
rm -rf /tmp/gen-py/
13+
thrift -gen py -o /tmp/ /tmp/fb303.thrift
14+
mv /tmp/gen-py/fb303 fb303
15+
16+
# Hive Metastore Thrift definition generation
17+
hive-metastore:
18+
rm -rf /tmp/hive
19+
mkdir -p /tmp/hive/share/fb303/if/
20+
curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/hive/share/fb303/if/fb303.thrift
21+
curl -s https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift
22+
thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift
23+
rm -rf hive_metastore
24+
mv /tmp/hive/gen-py/hive_metastore hive_metastore
25+
26+
# Clean generated files
27+
clean:
28+
rm -rf fb303
29+
rm -rf hive_metastore
30+
rm -rf /tmp/fb303.thrift
31+
rm -rf /tmp/gen-py/
32+
rm -rf /tmp/hive

0 commit comments

Comments
 (0)