@@ -2,18 +2,35 @@ PYTHON ?= python3
22
33makefile_dir := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST ) ) ) )
44
5- all : bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py \
6- bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py \
7- bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_*.py \
8- bblfsh/github/__init__.py \
9- bblfsh/github/com/__init__.py \
10- bblfsh/github/com/gogo/__init__.py \
11- bblfsh/github/com/gogo/protobuf/__init__.py \
12- bblfsh/github/com/gogo/protobuf/gogoproto/__init__.py \
13- bblfsh/github/com/bblfsh/__init__.py \
14- bblfsh/github/com/bblfsh/sdk/__init__.py \
15- bblfsh/github/com/bblfsh/sdk/uast/__init__.py \
16- bblfsh/github/com/bblfsh/sdk/protocol/__init__.py
5+ LIBUAST_VERSION = v0.2.0
6+
7+ .PHONY : all clean deps
8+
9+ all : deps \
10+ bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py \
11+ bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py \
12+ bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_* .py \
13+ bblfsh/github/__init__.py \
14+ bblfsh/github/com/__init__.py \
15+ bblfsh/github/com/gogo/__init__.py \
16+ bblfsh/github/com/gogo/protobuf/__init__.py \
17+ bblfsh/github/com/gogo/protobuf/gogoproto/__init__.py \
18+ bblfsh/github/com/bblfsh/__init__.py \
19+ bblfsh/github/com/bblfsh/sdk/__init__.py \
20+ bblfsh/github/com/bblfsh/sdk/uast/__init__.py \
21+ bblfsh/github/com/bblfsh/sdk/protocol/__init__.py
22+
23+ clean :
24+ rm -rf bblfsh/libuast
25+ rm -rf bblfsh/github
26+
27+ deps : bblfsh/libuast
28+
29+ bblfsh/libuast :
30+ curl -SL https://github.com/bblfsh/libuast/releases/download/$(LIBUAST_VERSION ) /libuast-$(LIBUAST_VERSION ) .tar.gz | tar xz
31+ mv libuast-$(LIBUAST_VERSION ) libuast
32+ cp -a libuast/src bblfsh/libuast
33+ rm -rf libuast
1734
1835bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py : github.com/gogo/protobuf/gogoproto/gogo.proto
1936 protoc --python_out bblfsh github.com/gogo/protobuf/gogoproto/gogo.proto
@@ -25,7 +42,7 @@ bblfsh/github/com/bblfsh/sdk/protocol:
2542 @mkdir -p $@
2643
2744bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_*.py : \
28- bblfsh/github/com/bblfsh/sdk/protocol github.com/bblfsh/sdk/protocol/generated.proto
45+ bblfsh/github/com/bblfsh/sdk/protocol github.com/bblfsh/sdk/protocol/generated.proto
2946 $(PYTHON ) -m grpc.tools.protoc --python_out=bblfsh/github/com/bblfsh/sdk/protocol \
3047 --grpc_python_out=bblfsh/github/com/bblfsh/sdk/protocol \
3148 -I github.com/bblfsh/sdk/protocol -I $(makefile_dir ) \
0 commit comments