box-o-sand/gotime/Makefile

37 lines
951 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/meatballhat.com/gotour-artifacts),\
$(patsubst %,meatballhat.com/gotour-artifacts/%,$(pkg))\
)
PACKAGES += $(foreach pkg,\
$(shell ls src/meatballhat.com/junkdrawer),\
$(patsubst %,meatballhat.com/junkdrawer/%,$(pkg))\
)
PACKAGES += meatballhat.com/amqpfun-runner
2012-11-10 18:41:02 +00:00
test: build
go test $(PACKAGES)
build: deps
go install $(PACKAGES)
fmt:
go fmt $(PACKAGES)
2012-11-10 18:41:02 +00:00
deps:
2012-11-13 00:06:33 +00:00
go get $(PACKAGES)
2012-11-10 18:41:02 +00:00
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)
2012-11-10 18:41:02 +00:00
.PHONY: test build clean publish env fmt