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.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)
|
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)
|
check_files:
|
||||||
|
@if [ -f "/usr/bin/bin/protoc-gen-go" ]; then \
|
||||||
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)
|
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:
|
all:
|
||||||
@echo
|
@echo
|
||||||
|
@ -22,15 +36,6 @@ all:
|
||||||
@echo
|
@echo
|
||||||
@echo for now, add mirrors.wit.com to apt and run 'apt install virtigo'
|
@echo for now, add mirrors.wit.com to apt and run 'apt install virtigo'
|
||||||
@echo
|
@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
|
make build
|
||||||
./virtigo --version
|
./virtigo --version
|
||||||
@echo build worked
|
@echo build worked
|
||||||
|
|
Loading…
Reference in New Issue