Merge pull request #118 from harshavardhana/pr_out_consolidate_developers_docs_and_makefile_create_symlink_automatically

master
Harshavardhana 10 years ago
commit 8bedf43a27
  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 .... .... Add paths to your bashrc ....
$ echo "export PATH=$PATH:${HOME}/local/go/bin" >> ${HOME}/.bashrc $ cat << EOF > ${HOME}/.bashrc
$ echo "export GOROOT=${HOME}/local/go" >> ${HOME}/.bashrc export PATH=$PATH:${HOME}/local/go/bin
$ echo "export GOPATH=$HOME/mygo" >> ${HOME}/.bashrc export GOROOT=${HOME}/local/go
$ echo "export PATH=$PATH:$GOPATH/bin" >> ${HOME}/.bashrc export GOPATH=$HOME/mygo
export PATH=$PATH:$GOPATH/bin
EOF
``` ```
## Mac OSX (Yosemite) 10.10 ## Mac OSX (Yosemite) 10.10
@ -77,9 +79,15 @@ $ mkdir -p $HOME/mygo
$ export GOPATH=$HOME/mygo $ export GOPATH=$HOME/mygo
$ export PATH=$PATH:$GOPATH/bin $ 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 .... .... Add paths to your bashrc ....
$ echo "export GOPATH=$HOME/mygo" >> ${HOME}/.bashrc $ cat << EOF > ~/.bashrc
$ echo "export PATH=$PATH:$GOPATH/bin" >> ${HOME}/.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 ```sh
$ git clone https://github.com/$USER_ID/minio $ git clone https://github.com/$USER_ID/minio
$ cd minio $ cd minio
$ mkdir -p ${GOPATH}/src/github.com/minio-io
$ ln -s ${PWD} $GOPATH/src/github.com/minio-io/
``` ```
### Compiling Minio from source ### 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 ```sh
$ make $ make
Checking if proper environment variables are set.. Done Checking if proper environment variables are set.. Done
... ...
Checking dependencies for Minio.. Done Checking dependencies for Minio.. Done
Installed godep
Installed cover
Building Libraries
... ...
... ...
``` ```
### Developer Guidelines ### Developer Guidelines
``Minio`` community welcomes your contribution. To make the process as seamless as possible, we ask for the following: ``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. * 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 #GOPATH := $(CURDIR)/tmp/gopath
MAKE_OPTIONS := -s MAKE_OPTIONS := -s
ARCH := $(shell uname -s)
all: getdeps install all: getdeps install
checkdeps: checkdeps:
@./checkdeps.sh @./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 getdeps: checkdeps
@go get github.com/tools/godep && echo "Installed godep" @go get github.com/tools/godep && echo "Installed godep"
@go get golang.org/x/tools/cmd/cover && echo "Installed cover" @go get golang.org/x/tools/cmd/cover && echo "Installed cover"
build-erasure: getdeps build-all: getdeps createsymlink
@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
@echo "Building Libraries" @echo "Building Libraries"
@godep go generate ./...
@godep go build ./... @godep go build ./...
test-all: build-all test-all: build-all

Loading…
Cancel
Save