all: test .PHONY: fq fq: VERSION=$(shell git describe --all --long --dirty 2>/dev/null || echo nogit) fq: CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -trimpath -o fq . .PHONY: test # figure out all go pakges with test files test: PKGS=$(shell find . -name "*_test.go" | xargs -n 1 dirname | sort | uniq) test: testjq testcli go test ${VERBOSE} ${COVER} ${PKGS} testwrite: export WRITE_ACTUAL=1 testwrite: test testv: export VERBOSE=-v testv: test cover: COVER=-cover -race -coverpkg=./... -coverprofile=cover.out cover: test go tool cover -html=cover.out -o cover.out.html cat cover.out.html | grep '