github.com/goki/ki@v1.1.11/Makefile (about) 1 # Basic Go makefile 2 3 GOCMD=go 4 GOBUILD=$(GOCMD) build 5 GOCLEAN=$(GOCMD) clean 6 GOTEST=$(GOCMD) test -covermode=atomic -coverprofile=coverage.out 7 GOGET=$(GOCMD) get 8 9 # exclude python from std builds 10 #DIRS=`go list ./... | grep -v python` 11 DIRS=`go list ./...` 12 13 all: build 14 15 build: 16 @echo "GO111MODULE = $(value GO111MODULE)" 17 $(GOBUILD) -v $(DIRS) 18 19 test: 20 @echo "GO111MODULE = $(value GO111MODULE)" 21 $(GOTEST) -v $(DIRS) 22 23 clean: 24 @echo "GO111MODULE = $(value GO111MODULE)" 25 $(GOCLEAN) ./... 26 27 fmts: 28 gofmt -s -w . 29 30 vet: 31 @echo "GO111MODULE = $(value GO111MODULE)" 32 $(GOCMD) vet $(DIRS) 33 34 tidy: export GO111MODULE = on 35 tidy: 36 @echo "GO111MODULE = $(value GO111MODULE)" 37 go mod tidy 38 39 old: 40 @echo "GO111MODULE = $(value GO111MODULE)" 41 go list -u -m all 42 43 mod-update: export GO111MODULE = on 44 mod-update: 45 @echo "GO111MODULE = $(value GO111MODULE)" 46 go get -u ./... 47 go mod tidy 48 49 # gopath-update is for GOPATH to get most things updated. 50 # need to call it in a target executable directory 51 gopath-update: export GO111MODULE = off 52 gopath-update: 53 @echo "GO111MODULE = $(value GO111MODULE)" 54 go get -u ./... 55 56 mod-update: export GO111MODULE = on 57 release: 58 @echo "GO111MODULE = $(value GO111MODULE)" 59 $(MAKE) -C ki release 60