diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -4,25 +4,36 @@ SRC = $(filter-out ${GEN} ${TEST}, $(wildcard *.go)) all: build lulu -build: ${SRC} ${GEN} - go build +test: testpkg testcli -testcli: lulu - $(eval PATH=$(shell pwd):${PATH}) - cd cmd/lulu && ./test +build: .build +.build: ${SRC} ${GEN} + go build + touch $@ ${GEN}: .gen - .gen: ${SRC} - go generate && touch $@ + go generate + touch $@ lulu: ${SRC} ${GEN} $(wildcard cmd/lulu/*.go) go build ./cmd/$@ +testpkg: .testpkg +.testpkg: ${SRC} ${GEN} ${TEST} + go test ./... + touch $@ + +testcli: .testcli +.testcli: lulu $(wildcard $(addprefix cmd/lulu/, test tests/* testdata/* testchecks/*)) + $(eval PATH=$(shell pwd):${PATH}) + cd cmd/lulu && ./test + touch $@ + spec.yml: curl -L -o $@ 'https://api.lulu.com/api-docs/openapi-specs/openapi_public.yml' clean: - rm -rf ${GEN} lulu .gen cmd/lulu/testerr cmd/lulu/testout + rm -rf ${GEN} lulu .build .gen .testpkg .testcli cmd/lulu/testerr cmd/lulu/testout -.PHONY: testcli +.PHONY: all build test testpkg testcli |