@@ -3,26 +3,31 @@ PYTHON ?= python3
33makefile_dir := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST ) ) ) )
44
55LIBUAST_VERSION = v0.2.0
6+ SDK_VERSION = v0
67
78.PHONY : all clean deps
89
910all : deps \
1011 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 \
12+ bblfsh/gopkg/in /bblfsh/sdk/ $( SDK_VERSION ) /uast/generated_pb2.py \
13+ bblfsh/gopkg/in /bblfsh/sdk/ $( SDK_VERSION ) /protocol/generated_pb2_* .py \
1314 bblfsh/github/__init__.py \
1415 bblfsh/github/com/__init__.py \
1516 bblfsh/github/com/gogo/__init__.py \
1617 bblfsh/github/com/gogo/protobuf/__init__.py \
1718 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
19+ bblfsh/gopkg/__init__.py \
20+ bblfsh/gopkg/in/__init__.py \
21+ bblfsh/gopkg/in/bblfsh/__init__.py \
22+ bblfsh/gopkg/in/bblfsh/sdk/__init__.py \
23+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /__init__.py \
24+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /uast/__init__.py \
25+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /protocol/__init__.py
2226
2327clean :
2428 rm -rf bblfsh/libuast
2529 rm -rf bblfsh/github
30+ rm -rf bblfsh/gopkg
2631
2732deps : bblfsh/libuast
2833
@@ -35,18 +40,24 @@ bblfsh/libuast:
3540bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py : github.com/gogo/protobuf/gogoproto/gogo.proto
3641 protoc --python_out bblfsh github.com/gogo/protobuf/gogoproto/gogo.proto
3742
38- bblfsh/github/com /bblfsh/sdk/uast/generated_pb2.py : github.com /bblfsh/sdk/uast/generated.proto
39- protoc --python_out bblfsh github.com /bblfsh/sdk/uast/generated.proto
43+ bblfsh/gopkg/in /bblfsh/sdk/$( SDK_VERSION ) / uast/generated_pb2.py : gopkg.in /bblfsh/sdk. $( SDK_VERSION ) /uast/generated.proto
44+ protoc --python_out bblfsh gopkg.in /bblfsh/sdk. $( SDK_VERSION ) /uast/generated.proto
4045
41- bblfsh/github/com /bblfsh/sdk/protocol :
46+ bblfsh/gopkg/in /bblfsh/sdk/ $( SDK_VERSION ) /protocol :
4247 @mkdir -p $@
4348
44- bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_*.py : \
45- bblfsh/github/com/bblfsh/sdk/protocol github.com/bblfsh/sdk/protocol/generated.proto
46- $(PYTHON ) -m grpc.tools.protoc --python_out=bblfsh/github/com/bblfsh/sdk/protocol \
47- --grpc_python_out=bblfsh/github/com/bblfsh/sdk/protocol \
48- -I github.com/bblfsh/sdk/protocol -I $(makefile_dir ) \
49- github.com/bblfsh/sdk/protocol/generated.proto
49+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /uast :
50+ @mkdir -p $@
51+
52+ bblfsh/github/com/gogo/protobuf/gogoproto :
53+ @mkdir -p $@
54+
55+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /protocol/generated_pb2_*.py : \
56+ bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /protocol gopkg.in/bblfsh/sdk.$(SDK_VERSION ) /protocol/generated.proto
57+ $(PYTHON ) -m grpc.tools.protoc --python_out=bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /protocol \
58+ --grpc_python_out=bblfsh/gopkg/in/bblfsh/sdk/$(SDK_VERSION ) /protocol \
59+ -I gopkg.in/bblfsh/sdk.$(SDK_VERSION ) /protocol -I $(makefile_dir ) \
60+ gopkg.in/bblfsh/sdk.$(SDK_VERSION ) /protocol/generated.proto
5061
5162% /__init__.py :
5263 @touch $@
0 commit comments