box-o-sand/gotime/Makefile
Dan Buch 1ab8d7d42c Moving bulk of amqp play crap into separate lib
in prep for changing the things, introducing more code.
2012-11-10 18:47:32 -05:00

33 lines
873 B
Makefile

CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":")
GOPATH := $(PWD):$(CLEAN_GOPATH)
PACKAGES := $(foreach pkg,\
$(shell ls src/meatballhat.com/gotour-artifacts),\
$(patsubst %,meatballhat.com/gotour-artifacts/%,$(pkg))\
)
PACKAGES += meatballhat.com/amqpfun-runner
test: build
go test $(PACKAGES)
build: deps
go install $(PACKAGES)
fmt:
go fmt $(PACKAGES)
deps:
go list -f '{{range .Imports}}{{.}} {{end}}' $(PACKAGES) | xargs go get
clean:
rm -v bin/*
publish:
rsync -avz src/meatballhat.com/gotour-artifacts mbh:meatballhat.com/docroot/
ssh mbh "find meatballhat.com/docroot/gotour-artifacts -type d -exec chmod 755 {} \; && find meatballhat.com/docroot/gotour-artifacts/ -type f -exec chmod 644 {} \;"
env:
@echo GOPATH=$(GOPATH)
@echo PACKAGES=$(PACKAGES)
.PHONY: test build clean publish env fmt