Skip to content

Commit

Permalink
set GOROOT explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgk committed Sep 29, 2019
1 parent 46a769a commit 8495c0b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Build Go bootstrap toolchains from the modern source.
# bash is expected to be on PATH

GOROOT= /usr/local/go

GOOS= freebsd
GOARCH= arm amd64 386
GOARCH= amd64 386 arm
GOARM= 6 7

UPLOAD_TARGET= dmgk@freefall.freebsd.org:public_distfiles/go/

all:
.for goarch in ${GOARCH}
. if ${goarch} == arm
. for goarm in ${GOARM}
cd ${.CURDIR}/go/src ; \
env GOOS=${GOOS} GOARCH=${goarch} GOARM=${goarm} CGO_ENABLED=0 \
env GOROOT=${GOROOT} PATH=${GOROOT}/bin:$$PATH \
GOOS=${GOOS} GOARCH=${goarch} GOARM=${goarm} CGO_ENABLED=0 \
../../bootstrap.sh
. endfor
. else
cd ${.CURDIR}/go/src ; \
env GOOS=${GOOS} GOARCH=${goarch} GO386=387 CGO_ENABLED=0 \
env GOROOT=${GOROOT} PATH=${GOROOT}/bin:$$PATH \
GOOS=${GOOS} GOARCH=${goarch} GO386=387 CGO_ENABLED=0 \
../../bootstrap.sh
. endif
.endfor
Expand All @@ -26,7 +28,7 @@ clean:
rm -rf go-*-bootstrap go-*.tar.xz

upload:
cp -v go-*.tar.xz ~/ports/distfiles
# scp -p go-*.tar.xz ${UPLOAD_TARGET}
# todo
cp -pv go-*.tar.xz ~/ports/distfiles

.PHONY: all clean upload

0 comments on commit 8495c0b

Please # to comment.