Consolidate developers docs and Makefile, create symlink automatically

master
Harshavardhana 10 years ago
parent dd5380fc86
commit 88af9ba666
  1. 20
      BUILDDEPS.md
  2. 8
      CONTRIBUTING.md
  3. 11
      Makefile

@ -35,10 +35,12 @@ $ export PATH=$PATH:$GOPATH/bin
.... Add paths to your bashrc ....
$ echo "export PATH=$PATH:${HOME}/local/go/bin" >> ${HOME}/.bashrc
$ echo "export GOROOT=${HOME}/local/go" >> ${HOME}/.bashrc
$ echo "export GOPATH=$HOME/mygo" >> ${HOME}/.bashrc
$ echo "export PATH=$PATH:$GOPATH/bin" >> ${HOME}/.bashrc
$ cat << EOF > ${HOME}/.bashrc
export PATH=$PATH:${HOME}/local/go/bin
export GOROOT=${HOME}/local/go
export GOPATH=$HOME/mygo
export PATH=$PATH:$GOPATH/bin
EOF
```
## Mac OSX (Yosemite) 10.10
@ -77,9 +79,15 @@ $ mkdir -p $HOME/mygo
$ export GOPATH=$HOME/mygo
$ export PATH=$PATH:$GOPATH/bin
$ GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6)
$ export GOROOT=$(brew --prefix)/Cellar/go/$GOVERSION/libexec
.... Add paths to your bashrc ....
$ echo "export GOPATH=$HOME/mygo" >> ${HOME}/.bashrc
$ echo "export PATH=$PATH:$GOPATH/bin" >> ${HOME}/.bashrc
$ cat << EOF > ~/.bashrc
GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6)
export GOPATH=$HOME/mygo
export PATH=$PATH:$GOPATH/bin
export GOROOT=$(brew --prefix)/Cellar/go/$GOVERSION/libexec
EOF
```

@ -3,20 +3,22 @@ Fork [Minio upstream](https://github.com/Minio-io/minio/fork) source repository
```sh
$ git clone https://github.com/$USER_ID/minio
$ cd minio
$ mkdir -p ${GOPATH}/src/github.com/minio-io
$ ln -s ${PWD} $GOPATH/src/github.com/minio-io/
```
### Compiling Minio from source
Minio uses ``Makefile`` to wrap around some of the limitations of ``go build``. To compile Minio source, simply change to your workspace folder and type ``make``.
Minio uses ``Makefile`` to wrap around some of the limitations of ``go`` build system. To compile Minio source, simply change to your workspace folder and type ``make``.
```sh
$ make
Checking if proper environment variables are set.. Done
...
Checking dependencies for Minio.. Done
Installed godep
Installed cover
Building Libraries
...
...
```
### Developer Guidelines
``Minio`` community welcomes your contribution. To make the process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.

@ -1,22 +1,21 @@
#GOPATH := $(CURDIR)/tmp/gopath
MAKE_OPTIONS := -s
ARCH := $(shell uname -s)
all: getdeps install
checkdeps:
@./checkdeps.sh
createsymlink:
@if test ! -h $(GOPATH)/src/github.com/minio-io/minio; then echo "Creating symlink to $(GOPATH)/src/github.com/minio-io/minio" && ln -s $(PWD) $(GOPATH)/src/github.com/minio-io/minio; fi
getdeps: checkdeps
@go get github.com/tools/godep && echo "Installed godep"
@go get golang.org/x/tools/cmd/cover && echo "Installed cover"
build-erasure: getdeps
@godep go generate github.com/minio-io/minio/pkg/storage/erasure
@godep go build github.com/minio-io/minio/pkg/storage/erasure
build-all: getdeps build-erasure
build-all: getdeps createsymlink
@echo "Building Libraries"
@godep go generate ./...
@godep go build ./...
test-all: build-all

Loading…
Cancel
Save