CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":") GOPATH := $(PWD):$(CLEAN_GOPATH) PACKAGES := $(foreach pkg,\ $(shell ls src/gotime.example.org/gotour-artifacts),\ $(patsubst %,gotime.example.org/gotour-artifacts/%,$(pkg))\ ) PACKAGES += $(foreach pkg,\ $(shell ls src/gotime.example.org/junkdrawer),\ $(patsubst %,gotime.example.org/junkdrawer/%,$(pkg))\ ) PACKAGES += gotime.example.org/amqpfun-runner test: build go test -x -v $(PACKAGES) build: deps go install -x $(PACKAGES) fmt: go fmt -x $(PACKAGES) deps: go get -x $(PACKAGES) clean: rm -v bin/* env: @echo GOPATH=$(GOPATH) @echo PACKAGES=$(PACKAGES) .PHONY: test build clean env fmt