parent
ea7cf0e744
commit
1c2bdfa398
29
Makefile
29
Makefile
|
@ -6,9 +6,23 @@ VERSION = $(shell git describe --tags)
|
|||
# REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi)
|
||||
REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi)
|
||||
|
||||
PROTOGEN= $(shell if [ -e /usr/bin/protoc-gen-go ]; then echo probably wrong protoc-gen-go exists; else echo ok; fi)
|
||||
|
||||
PROTOGENLOCAL= $(shell if [ -e ~/go/bin/protoc-gen-go ]; then echo ~/go/bin/protoc-gen-go exists ok; else echo build the right one with: make protogen && exit 0; fi)
|
||||
check_files:
|
||||
@if [ -f "/usr/bin/bin/protoc-gen-go" ]; then \
|
||||
echo "the protoc-gen-go package is old in debian sid right now"; \
|
||||
echo "for now, remove it"; \
|
||||
apt remote proto-gen-go \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ ! -f "../../lib/protobuf/virtbuf/droplet.pb.go" ]; then \
|
||||
echo "you must build the protobuf files first"; \
|
||||
echo "They should be in: ../../lib/protobuf/virtbuf/droplet.pb.go"; \
|
||||
make -C ../../lib/protobuf/virtbuf/; \
|
||||
fi
|
||||
@if [ ! -f "$(HOME)/go/bin/protoc-gen-go" ]; then \
|
||||
echo "you must build protoc-gen-go from google"; \
|
||||
exit 1; \
|
||||
fi
|
||||
make all
|
||||
|
||||
all:
|
||||
@echo
|
||||
|
@ -22,15 +36,6 @@ all:
|
|||
@echo
|
||||
@echo for now, add mirrors.wit.com to apt and run 'apt install virtigo'
|
||||
@echo
|
||||
|
||||
build-attempt1:
|
||||
@echo ${PROTOGEN}
|
||||
@echo ${PROTOGENLOCAL}
|
||||
@if [ ! -f ~/go/bin/protc-gen-go ]; then \
|
||||
echo "you have not build ~/go/bin/protoc-gen-go from google's repo"; \
|
||||
echo "run 'make protogen'" \
|
||||
exit -1; \
|
||||
fi
|
||||
make build
|
||||
./virtigo --version
|
||||
@echo build worked
|
||||
|
|
Loading…
Reference in New Issue