summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile29
-rwxr-xr-xbuild2
2 files changed, 18 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 2367971..ebad2d3 100644
--- a/Makefile
+++ b/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
diff --git a/build b/build
index 1ab3886..58ef064 100755
--- a/build
+++ b/build
@@ -2,4 +2,4 @@
# this is the systemd control file
mkdir -p files/usr/bin/
-cp ../../lib/daemons/virtigod/virtigod files/usr/bin/
+cp ../virtigoctl/virtigoctl files/usr/bin/