forked from ligato/vpp-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakeroutines.mk
25 lines (23 loc) · 1.28 KB
/
Makeroutines.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# install dependencies according to glide.yaml & glide.lock (in case vendor dir was deleted)
define install_dependencies
$(if $(shell command -v glide install 2> /dev/null),$(info glide dependency manager is ready),$(error glide dependency manager missing, info about installation can be found here https://github.com/Masterminds/glide))
@echo "# installing dependencies, please wait ..."
@glide install --strip-vendor
endef
# clean update dependencies according to glide.yaml (re-downloads all of them)
define update_dependencies
$(if $(shell command -v glide install 2> /dev/null),$(info glide dependency manager is ready),$(error glide dependency manager missing, info about installation can be found here https://github.com/Masterminds/glide))
@echo "# updating dependencies, please wait ..."
@-cd vendor && rm -rf *
@echo "# vendor dir cleared"
@-rm -rf glide.lock
@glide cc
@echo "# glide cache cleared"
@glide install --strip-vendor
endef
# install code generators
define install_generators
$(if $(shell command -v protoc --gogo_out=. 2> /dev/null),$(info # gogo/protobuf is installed),$(error gogo/protobuf missing, please install it with go get github.com/gogo/protobuf))
@echo "# installing binapi-generator"
@cd vendor/git.fd.io/govpp.git/cmd/binapi-generator && go install -v
endef