Re-namespacing everything and fixing imports to match
This commit is contained in:
parent
335fe2e9bd
commit
76c392967d
@ -1,23 +1,24 @@
|
||||
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),\
|
||||
$(patsubst %,meatballhat.com/%,$(pkg))\
|
||||
)
|
||||
REPO_BASE := github.com/meatballhat/box-o-sand/algs4/go
|
||||
TARGETS := \
|
||||
$(REPO_BASE)/algs4 \
|
||||
$(REPO_BASE)/algs4-binarysearch \
|
||||
$(REPO_BASE)/algs4-flips \
|
||||
$(REPO_BASE)/algs4-gcd \
|
||||
$(REPO_BASE)/algs4-rolls
|
||||
|
||||
test: build
|
||||
go test $(PACKAGES)
|
||||
go test -x $(TARGETS)
|
||||
|
||||
build: deps
|
||||
go install $(PACKAGES)
|
||||
go install -x $(TARGETS)
|
||||
|
||||
fmt:
|
||||
go fmt $(PACKAGES)
|
||||
go fmt -x $(TARGETS)
|
||||
|
||||
deps:
|
||||
go get $(PACKAGES)
|
||||
go get -x -n $(TARGETS)
|
||||
|
||||
clean:
|
||||
rm -v bin/*
|
||||
go clean -x -x $(TARGETS)
|
||||
|
||||
.PHONY: test build clean fmt
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
const USAGE string = `Usage: algs4-binarysearch <whitelist-file>
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
const USAGE string = "Usage: algs4-flips <nflips>"
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
const USAGE string = `Usage: algs4-gcd <uint> <uint>`
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
const (
|
@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
func TestBinarySearchRank(t *testing.T) {
|
@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
func TestGcd(t *testing.T) {
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"meatballhat.com/algs4"
|
||||
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||
)
|
||||
|
||||
const INTS_STRING = `
|
Loading…
Reference in New Issue
Block a user