X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=Makefile;h=c7569895201a26f030f971b8c42ca06e0816e108;hb=97641dde0b55b588bfd27817a6a9deac3b337513;hp=152ec8a21927a82c6057a686ca84fc123f70bc3a;hpb=0b1c52758ea780b5666a708d1977716b1387fc8e;p=safcm%2Fsafcm.git diff --git a/Makefile b/Makefile index 152ec8a..c756989 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ LDFLAGS = '\ -X "main.versionGit=$(shell git describe --long --tags --dirty --always)" \ -X "main.versionGo=$(shell go version)" \ ' +# Build with `make GOFLAGS=` if -race is not supported +GOFLAGS=-race all: safcm @@ -9,13 +11,13 @@ all: safcm safcm: go fmt ./... cd cmd/safcm-remote && ./build.sh - go build -ldflags $(LDFLAGS) -race ruderich.org/simon/safcm/cmd/safcm + go build $(GOFLAGS) -ldflags $(LDFLAGS) ruderich.org/simon/safcm/cmd/safcm @# For proper permissions after initial clone with a strict umask cd cmd/safcm/testdata/project && ../../../../safcm fixperms 2> /dev/null test: go vet ./... - go test -race ./... + go test $(GOFLAGS) $(TESTFLAGS) ./... clean: rm -rf remote/helpers/