box-o-sand/gotime/Makefile

33 lines
718 B
Makefile
Raw Normal View History

2012-11-10 18:41:02 +00:00
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
2012-11-10 18:41:02 +00:00
test: build
go test -x -v $(PACKAGES)
2012-11-10 18:41:02 +00:00
build: deps
go install -x $(PACKAGES)
fmt:
go fmt -x $(PACKAGES)
2012-11-10 18:41:02 +00:00
deps:
go get -x $(PACKAGES)
2012-11-10 18:41:02 +00:00
clean:
rm -v bin/*
env:
@echo GOPATH=$(GOPATH)
@echo PACKAGES=$(PACKAGES)
.PHONY: test build clean env fmt