th5/_dev/go.sh
Henry D. Case cb443468e8 Makefile improvement
Following things where added/changed:
* Builds correctly tls-tris. Previously go had a problem with
  a symbolic link resulting in not building tls-tris at all. I've
  used `rsync' instead.
* Can build for selected platform with "ARCH=platform make -f Makefile"
* Possible to build from any directory. Previously ``cd _dev; make``
  was required, it's possible to ``cd /whever/you/want; make -f /tris/Makefile``
2018-03-01 16:12:07 +00:00

11 lines
227 B
Bash
Executable File

#!/usr/bin/env bash
set -e
BASEDIR=$(cd "$(dirname "$0")" && pwd)
GOENV="$(go env GOHOSTOS)_$(go env GOHOSTARCH)"
BUILD_DIR=${BASEDIR}/GOROOT make -f $BASEDIR/Makefile >&2
export GOROOT="$BASEDIR/GOROOT/$GOENV"
exec go "$@"