Attempting to correct Go project layout

This commit is contained in:
Dan Buch 2012-12-01 18:34:55 -05:00
parent bbb709be31
commit 80e5b8fa5e
6 changed files with 9 additions and 24 deletions

View File

@ -1,32 +1,16 @@
CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":")
GOPATH := $(PWD):$(CLEAN_GOPATH)
REPO_BASE := github.com/meatballhat/box-o-sand/sylvilagus/go
PACKAGES := \
meatballhat.com/sylvilagus-conntest \
meatballhat.com/sylvilagus-chapter02-hello-world-consumer \
meatballhat.com/sylvilagus-chapter02-hello-world-producer
export GOPATH
$(REPO_BASE)/sylvilagus-conntest \
$(REPO_BASE)/sylvilagus-chapter02-hello-world-consumer \
$(REPO_BASE)/sylvilagus-chapter02-hello-world-producer
test: build
go test $(PACKAGES)
go test -x -v $(PACKAGES)
build: deps
go install $(PACKAGES)
go install -x $(PACKAGES)
deps:
go get $(PACKAGES)
go get -x $(PACKAGES)
fmt:
go fmt $(PACKAGES)
clean:
go clean $(PACKAGES)
rm -v bin/*
find pkg -name '*.a' -exec rm -v {} \;
env:
@echo GOPATH=$(GOPATH)
@echo PACKAGES=$(PACKAGES)
.PHONY: all clean env fmt
.PHONY: test build deps

View File

@ -0,0 +1 @@
package sylvilagus