|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | +# Makefile for generating vendor packages |
| 18 | + |
| 19 | +.PHONY: all clean fb303 hive-metastore |
| 20 | + |
| 21 | +all: fb303 hive-metastore |
| 22 | + |
| 23 | +# FB303 Thrift client generation |
| 24 | +fb303: |
| 25 | + rm -f /tmp/fb303.thrift |
| 26 | + rm -rf fb303 |
| 27 | + curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/fb303.thrift |
| 28 | + rm -rf /tmp/gen-py/ |
| 29 | + thrift -gen py -o /tmp/ /tmp/fb303.thrift |
| 30 | + mv /tmp/gen-py/fb303 fb303 |
| 31 | + |
| 32 | +# Hive Metastore Thrift definition generation |
| 33 | +hive-metastore: |
| 34 | + rm -rf /tmp/hive |
| 35 | + mkdir -p /tmp/hive/share/fb303/if/ |
| 36 | + curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/hive/share/fb303/if/fb303.thrift |
| 37 | + curl -s https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift |
| 38 | + thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift |
| 39 | + rm -rf hive_metastore |
| 40 | + mv /tmp/hive/gen-py/hive_metastore hive_metastore |
0 commit comments