Collapsing tree into more sane Go project layout

since I was in here looking at something unrelated...
This commit is contained in:
Dan Buch 2012-12-13 18:12:43 -05:00
parent 270eb1fc2d
commit 44999623da
19 changed files with 23 additions and 31 deletions

View File

@ -1,7 +0,0 @@
if [ -z "$_GOTIME_DID_SETUP" ] ; then
export PATH="$HOME/src/box-o-sand/src/gotime/.installation/go/bin:$PATH"
export GOROOT="$HOME/src/box-o-sand/src/gotime/.installation/go"
export GOPATH="$HOME/src/box-o-sand/src/gotime:$GOROOT"
source "$GOROOT/misc/bash/go"
export _GOTIME_DID_SETUP=1
fi

View File

@ -1,32 +1,31 @@
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
TARGETS = \
github.com/meatballhat/box-o-sand/gotime/amqpfun \
github.com/meatballhat/box-o-sand/gotime/amqpfun-runner \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/buffered-channels \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/channels \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-fibonacci-closure \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-http-handlers \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-maps \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-rot13-reader \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-slices \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-sqrt \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/goroutines \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/hello-web \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/maps \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/ranges \
github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/selects \
github.com/meatballhat/box-o-sand/gotime/junkdrawer/greppish
test: build
go test -x -v $(PACKAGES)
go test -x -v $(TARGETS)
build: deps
go install -x $(PACKAGES)
fmt:
go fmt -x $(PACKAGES)
go install -x $(TARGETS)
deps:
go get -x $(PACKAGES)
go get -n -x $(TARGETS)
clean:
rm -v bin/*
go clean -x -i $(TARGETS)
env:
@echo GOPATH=$(GOPATH)
@echo PACKAGES=$(PACKAGES)
.PHONY: test build clean env fmt
.PHONY: test build clean fmt

View File

@ -6,7 +6,7 @@ import (
)
import (
"gotime.example.org/amqpfun"
"github.com/meatballhat/box-o-sand/gotime/amqpfun"
)
const USAGE = "Usage: amqpfun-runner (publish|consume)"

View File