diff --git a/.gitignore b/.gitignore index e38cb16ea..f416807ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .gvm_local -minios +/tmp/ +/bin/ +**/*.swp diff --git a/Makefile b/Makefile index 345d26f9f..e5cf17177 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,22 @@ -GOPATH := $(CURDIR)/third_party +GOPATH := $(CURDIR)/tmp/gopath -all: - go build +all: build copy_bin + +copy_bin: + cp tmp/gopath/bin/* bin/ + +stage_build: + mkdir -p $(GOPATH) + mkdir -p bin + mkdir -p tmp/gopath/src/github.com/minios/minios + rsync -a . tmp/gopath/src/github.com/minios/minios/ + rsync -a third_party/* tmp/gopath + + +build: stage_build + go install github.com/minios/minios/minios + go install github.com/minios/minios/miniosd + cp tmp/gopath/bin/* bin/ clean: - rm minios + rm -rf tmp bin diff --git a/main.go b/minios/main.go similarity index 61% rename from main.go rename to minios/main.go index 91e7378c4..d8fa92921 100644 --- a/main.go +++ b/minios/main.go @@ -3,5 +3,5 @@ package main import "fmt" func main() { - fmt.Println("Hello World") + fmt.Println("hello") } diff --git a/miniosd/main.go b/miniosd/main.go new file mode 100644 index 000000000..d8fa92921 --- /dev/null +++ b/miniosd/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("hello") +}