diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 32 |
1 files changed, 7 insertions, 25 deletions
@@ -6,34 +6,11 @@ BUILDTIME = $(shell date +%Y.%m.%d) # create the go.mod and go.sum if this is a brand new repo REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi) -check_files: - @echo - @echo the build is complicated right now because you need - @echo the google version of protoc-gen-go which is not the one in debian sid yet - @echo - @if [ -f "/usr/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: - make build +all: build ./virtigo --version @echo build worked -build: +build: goimports vet GO111MODULE=off go build \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" @@ -96,6 +73,10 @@ release-build: goimports: goimports -w *.go +vet: + @GO111MODULE=off go vet + @echo this go binary package builds okay + # remake the go.mod and go.sum files redomod: rm -f go.* @@ -105,6 +86,7 @@ redomod: clean: rm -f go.* rm -f virtigo* + go-mod-clean --purge # git clone the sources and all the golang dependancies into ~/go/src # if you don't have go-clone, you can get it from http://go.wit.com/ |
