Attempting to correct Go project layout
This commit is contained in:
parent
bbb709be31
commit
80e5b8fa5e
@ -1,32 +1,16 @@
|
|||||||
CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":")
|
REPO_BASE := github.com/meatballhat/box-o-sand/sylvilagus/go
|
||||||
GOPATH := $(PWD):$(CLEAN_GOPATH)
|
|
||||||
PACKAGES := \
|
PACKAGES := \
|
||||||
meatballhat.com/sylvilagus-conntest \
|
$(REPO_BASE)/sylvilagus-conntest \
|
||||||
meatballhat.com/sylvilagus-chapter02-hello-world-consumer \
|
$(REPO_BASE)/sylvilagus-chapter02-hello-world-consumer \
|
||||||
meatballhat.com/sylvilagus-chapter02-hello-world-producer
|
$(REPO_BASE)/sylvilagus-chapter02-hello-world-producer
|
||||||
|
|
||||||
export GOPATH
|
|
||||||
|
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
go test $(PACKAGES)
|
go test -x -v $(PACKAGES)
|
||||||
|
|
||||||
build: deps
|
build: deps
|
||||||
go install $(PACKAGES)
|
go install -x $(PACKAGES)
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get $(PACKAGES)
|
go get -x $(PACKAGES)
|
||||||
|
|
||||||
fmt:
|
.PHONY: test build deps
|
||||||
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
|
|
||||||
|
1
sylvilagus/go/sylvilagus.go
Normal file
1
sylvilagus/go/sylvilagus.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package sylvilagus
|
Loading…
Reference in New Issue
Block a user