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 safcm: go fmt ./... cd cmd/safcm-remote && ./build.sh 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 $(GOFLAGS) ./... clean: rm -rf remote/helpers/ rm -f safcm .PHONY: all test clean safcm