summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9f01af1..cd63881 100644
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,16 @@ 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)
-all: build
+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)
+
+all:
+ @echo ${PROTOGEN}
+ @echo ${PROTOGENLOCAL}
+ make build
./virtigo --version
- ./virtigo --help
+ @echo build worked
build:
GO111MODULE=off go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
@@ -93,3 +100,7 @@ http-missing:
http-dumplibvirtxml:
curl --silent http://localhost:8080//dumplibvirtxml
+
+protogen:
+ go-clone google.golang.org/protobuf
+ cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go && go install