GEN = $(addsuffix _gen.go, cover interior pkgid ship status) TEST = $(wildcard *_test.go) SRC = $(filter-out ${GEN} ${TEST}, $(wildcard *.go)) all: build lulu build: ${SRC} ${GEN} go build testcli: lulu cmd/lulu/test $(wildcard cmd/lulu/tests/*) $(wildcard cmd/lulu/testdata/*) $(eval PATH=$(shell pwd):${PATH}) cd cmd/lulu && ./test ${GEN}: .gen .gen: ${SRC} go generate && touch $@ lulu: ${SRC} ${GEN} $(wildcard cmd/lulu/*.go) go build ./cmd/$@ spec.yml: curl -L -o $@ 'https://api.lulu.com/api-docs/openapi-specs/openapi_public.yml' clean: cat .gitignore | xargs -I{} sh -c "rm -rf ./{}" .PHONY: testcli