Re-namespacing everything and fixing imports to match

This commit is contained in:
Dan Buch 2012-12-19 21:10:56 -05:00
parent 335fe2e9bd
commit 76c392967d
13 changed files with 19 additions and 18 deletions

View File

@ -1,23 +1,24 @@
CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":") REPO_BASE := github.com/meatballhat/box-o-sand/algs4/go
GOPATH := $(PWD):$(CLEAN_GOPATH) TARGETS := \
PACKAGES := $(foreach pkg,\ $(REPO_BASE)/algs4 \
$(shell ls src/meatballhat.com),\ $(REPO_BASE)/algs4-binarysearch \
$(patsubst %,meatballhat.com/%,$(pkg))\ $(REPO_BASE)/algs4-flips \
) $(REPO_BASE)/algs4-gcd \
$(REPO_BASE)/algs4-rolls
test: build test: build
go test $(PACKAGES) go test -x $(TARGETS)
build: deps build: deps
go install $(PACKAGES) go install -x $(TARGETS)
fmt: fmt:
go fmt $(PACKAGES) go fmt -x $(TARGETS)
deps: deps:
go get $(PACKAGES) go get -x -n $(TARGETS)
clean: clean:
rm -v bin/* go clean -x -x $(TARGETS)
.PHONY: test build clean fmt .PHONY: test build clean fmt

View File

@ -8,7 +8,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
const USAGE string = `Usage: algs4-binarysearch <whitelist-file> const USAGE string = `Usage: algs4-binarysearch <whitelist-file>

View File

@ -10,7 +10,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
const USAGE string = "Usage: algs4-flips <nflips>" const USAGE string = "Usage: algs4-flips <nflips>"

View File

@ -7,7 +7,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
const USAGE string = `Usage: algs4-gcd <uint> <uint>` const USAGE string = `Usage: algs4-gcd <uint> <uint>`

View File

@ -7,7 +7,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
const ( const (

View File

@ -5,7 +5,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
func TestBinarySearchRank(t *testing.T) { func TestBinarySearchRank(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
func TestGcd(t *testing.T) { func TestGcd(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
) )
import ( import (
"meatballhat.com/algs4" "github.com/meatballhat/box-o-sand/algs4/go/algs4"
) )
const INTS_STRING = ` const INTS_STRING = `