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" ":") TARGETS = \
GOPATH := $(PWD):$(CLEAN_GOPATH) github.com/meatballhat/box-o-sand/gotime/amqpfun \
PACKAGES := $(foreach pkg,\ github.com/meatballhat/box-o-sand/gotime/amqpfun-runner \
$(shell ls src/gotime.example.org/gotour-artifacts),\ github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/buffered-channels \
$(patsubst %,gotime.example.org/gotour-artifacts/%,$(pkg))\ github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/channels \
) github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-fibonacci-closure \
PACKAGES += $(foreach pkg,\ github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-http-handlers \
$(shell ls src/gotime.example.org/junkdrawer),\ github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-maps \
$(patsubst %,gotime.example.org/junkdrawer/%,$(pkg))\ github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-rot13-reader \
) github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-slices \
PACKAGES += gotime.example.org/amqpfun-runner 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 test: build
go test -x -v $(PACKAGES) go test -x -v $(TARGETS)
build: deps build: deps
go install -x $(PACKAGES) go install -x $(TARGETS)
fmt:
go fmt -x $(PACKAGES)
deps: deps:
go get -x $(PACKAGES) go get -n -x $(TARGETS)
clean: clean:
rm -v bin/* go clean -x -i $(TARGETS)
env: .PHONY: test build clean fmt
@echo GOPATH=$(GOPATH)
@echo PACKAGES=$(PACKAGES)
.PHONY: test build clean env fmt

View File

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

View File