github.com/unigraph-dev/dgraph@v1.1.1-0.20200923154953-8b52b426f765/protos/Makefile (about) 1 # 2 # Copyright 2018 Dgraph Labs, Inc. and Contributors 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # 16 17 PROTO_PATH := ${GOPATH}/src:. 18 PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/dgraph-io/dgraph 19 PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/dgraph-io/dgo/protos 20 PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/dgraph-io/badger/pb 21 22 .PHONY: help 23 help: 24 @echo Use \"make regenerate\" to proceed. 25 26 .PHONY: clean 27 clean: 28 @mkdir -p pb && rm -f pb/pb.pb.go 29 30 .PHONY: check 31 check: 32 @./depcheck.sh && \ 33 (echo "Upgrading proto libraries before regenerating." ; \ 34 go get -u github.com/golang/protobuf/protoc-gen-go ; \ 35 go get -u github.com/gogo/protobuf/protoc-gen-gofast) 36 37 .PHONY: regenerate 38 regenerate: check clean 39 @protoc \ 40 --proto_path=${PROTO_PATH} \ 41 --gofast_out=plugins=grpc,Mapi.proto=github.com/dgraph-io/dgo/protos/api:pb \ 42 pb.proto 43 @echo Done.