tris: fix cross-compilation and relocation
This commit is contained in:
parent
345fbe2a39
commit
831410a948
@ -1,5 +1,5 @@
|
|||||||
GO ?= go
|
GO ?= go
|
||||||
GOENV := $(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH)
|
GOENV := $(shell $(GO) env GOHOSTOS)_$(shell $(GO) env GOHOSTARCH)
|
||||||
GOROOTINFO := $(shell $(GO) version | cut -d' ' -f 3)_$(GOENV)
|
GOROOTINFO := $(shell $(GO) version | cut -d' ' -f 3)_$(GOENV)
|
||||||
|
|
||||||
.PHONY: GOROOT
|
.PHONY: GOROOT
|
||||||
|
@ -4,9 +4,9 @@ set -e
|
|||||||
BASEDIR=$(cd "$(dirname "$0")" && pwd)
|
BASEDIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
|
||||||
make --quiet -C "$BASEDIR" go >&2
|
make --quiet -C "$BASEDIR" go >&2
|
||||||
GOENV="$(go env GOOS)_$(go env GOARCH)"
|
GOENV="$(go env GOHOSTOS)_$(go env GOHOSTARCH)"
|
||||||
|
|
||||||
unset GOROOT
|
export GOROOT="$BASEDIR/go/$GOENV"
|
||||||
make --quiet -C "$BASEDIR" GOROOT GO="$BASEDIR/go/$GOENV/bin/go" >&2
|
make --quiet -C "$BASEDIR" GOROOT GO="$BASEDIR/go/$GOENV/bin/go" >&2
|
||||||
export GOROOT="$BASEDIR/GOROOT/$GOENV"
|
export GOROOT="$BASEDIR/GOROOT/$GOENV"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user