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)
|
2012-11-06 01:36:27 +00:00
|
|
|
PACKAGES := $(foreach pkg,\
|
2012-12-01 00:31:24 +00:00
|
|
|
$(shell ls src/gotime.example.org/gotour-artifacts),\
|
|
|
|
$(patsubst %,gotime.example.org/gotour-artifacts/%,$(pkg))\
|
2012-11-06 01:36:27 +00:00
|
|
|
)
|
2012-11-11 01:27:23 +00:00
|
|
|
PACKAGES += $(foreach pkg,\
|
2012-12-01 00:31:24 +00:00
|
|
|
$(shell ls src/gotime.example.org/junkdrawer),\
|
|
|
|
$(patsubst %,gotime.example.org/junkdrawer/%,$(pkg))\
|
2012-11-11 01:27:23 +00:00
|
|
|
)
|
2012-12-01 00:31:24 +00:00
|
|
|
PACKAGES += gotime.example.org/amqpfun-runner
|
2012-08-26 01:08:08 +00:00
|
|
|
|
2012-11-10 18:41:02 +00:00
|
|
|
test: build
|
2012-12-01 00:31:24 +00:00
|
|
|
go test -x -v $(PACKAGES)
|
2012-11-10 18:41:02 +00:00
|
|
|
|
2012-11-10 23:47:32 +00:00
|
|
|
build: deps
|
2012-12-01 00:31:24 +00:00
|
|
|
go install -x $(PACKAGES)
|
2012-08-26 01:08:08 +00:00
|
|
|
|
2012-11-06 01:59:42 +00:00
|
|
|
fmt:
|
2012-12-01 00:31:24 +00:00
|
|
|
go fmt -x $(PACKAGES)
|
2012-11-06 01:59:42 +00:00
|
|
|
|
2012-11-10 18:41:02 +00:00
|
|
|
deps:
|
2012-12-01 00:31:24 +00:00
|
|
|
go get -x $(PACKAGES)
|
2012-11-10 18:41:02 +00:00
|
|
|
|
2012-08-26 01:08:08 +00:00
|
|
|
clean:
|
|
|
|
rm -v bin/*
|
|
|
|
|
2012-11-06 01:36:27 +00:00
|
|
|
env:
|
|
|
|
@echo GOPATH=$(GOPATH)
|
|
|
|
@echo PACKAGES=$(PACKAGES)
|
|
|
|
|
2012-12-01 00:31:24 +00:00
|
|
|
.PHONY: test build clean env fmt
|