env work
This commit is contained in:
parent
9858dc5d0d
commit
2da74dd34d
|
@ -0,0 +1,35 @@
|
||||||
|
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
#
|
||||||
|
# If you find yourself ignoring temporary files generated by your text editor
|
||||||
|
# or operating system, you probably want to add a global ignore instead:
|
||||||
|
# git config --global core.excludesfile ~/.gitignore_global
|
||||||
|
|
||||||
|
/tmp
|
||||||
|
*/**/*un~
|
||||||
|
*/**/*.test
|
||||||
|
*un~
|
||||||
|
.DS_Store
|
||||||
|
*/**/.DS_Store
|
||||||
|
.ethtest
|
||||||
|
*/**/*tx_database*
|
||||||
|
*/**/*dapps*
|
||||||
|
Godeps/_workspace/pkg
|
||||||
|
Godeps/_workspace/bin
|
||||||
|
|
||||||
|
#*
|
||||||
|
.#*
|
||||||
|
*#
|
||||||
|
*~
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
|
||||||
|
# used by the Makefile
|
||||||
|
/build/_workspace/
|
||||||
|
/build/bin/
|
||||||
|
|
||||||
|
# travis
|
||||||
|
profile.tmp
|
||||||
|
profile.cov
|
||||||
|
|
||||||
|
# vagrant
|
||||||
|
.vagrant
|
11
Makefile
11
Makefile
|
@ -1,13 +1,14 @@
|
||||||
|
GOBIN = build/bin
|
||||||
GO ?= latest
|
GO ?= latest
|
||||||
|
|
||||||
statusgo:
|
statusgo:
|
||||||
go install
|
build/env.sh go build -i -o $(GOBIN)/statusgo ./
|
||||||
@echo "Done installing status go."
|
@echo "status go compilation done."
|
||||||
@echo "Run \"statusgo\" to view available commands"
|
@echo "Run \"build/bin/statusgo\" to view available commands"
|
||||||
|
|
||||||
statusgo-android: xgo
|
statusgo-android: xgo
|
||||||
xgo --go=$(GO) --targets=android-16/aar ./
|
build/env.sh $(GOBIN)/xgo --go=$(GO) --dest=$(GOBIN) --targets=android-16/aar ./
|
||||||
@echo "Android cross compilation done:"
|
@echo "Android cross compilation done:"
|
||||||
|
|
||||||
xgo:
|
xgo:
|
||||||
go get github.com/karalabe/xgo
|
build/env.sh go get github.com/karalabe/xgo
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -f "build/env.sh" ]; then
|
||||||
|
echo "$0 must be run from the root of the repository."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create fake Go workspace if it doesn't exist yet.
|
||||||
|
workspace="$PWD/build/_workspace"
|
||||||
|
root="$PWD"
|
||||||
|
ethdir="$workspace/src/github.com/ethereum"
|
||||||
|
if [ ! -L "$ethdir/go-ethereum" ]; then
|
||||||
|
mkdir -p "$ethdir"
|
||||||
|
cd "$ethdir"
|
||||||
|
ln -s ../../../../../. go-ethereum
|
||||||
|
cd "$root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set up the environment to use the workspace.
|
||||||
|
# Also add Godeps workspace so we build using canned dependencies.
|
||||||
|
GOPATH="$ethdir/go-ethereum/Godeps/_workspace:$workspace"
|
||||||
|
GOBIN="$PWD/build/bin"
|
||||||
|
export GOPATH GOBIN
|
||||||
|
|
||||||
|
# Run the command inside the workspace.
|
||||||
|
cd "$ethdir/go-ethereum"
|
||||||
|
PWD="$ethdir/go-ethereum"
|
||||||
|
|
||||||
|
# Launch the arguments with the configured environment.
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue