fix makefile. makefiles are awesome. always have one, but fuck makefiles
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
638539c840
commit
15fe83812b
15
Makefile
15
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.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)
|
||||||
|
|
||||||
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 --version
|
||||||
./virtigo --help
|
@echo build worked
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GO111MODULE=off go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
|
GO111MODULE=off go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
@ -93,3 +100,7 @@ http-missing:
|
||||||
|
|
||||||
http-dumplibvirtxml:
|
http-dumplibvirtxml:
|
||||||
curl --silent http://localhost:8080//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
|
||||||
|
|
Loading…
Reference in New Issue