summaryrefslogtreecommitdiff
path: root/misc/cgo
diff options
context:
space:
mode:
authorDevon H. O'Dell <devon.odell@gmail.com>2009-12-11 15:14:09 -0800
committerDevon H. O'Dell <devon.odell@gmail.com>2009-12-11 15:14:09 -0800
commita067450a1fb8a60e1f1d3a7a7ca67120f567e7cb (patch)
tree2983280de546e6fd900fb4e74550f80fe688acaf /misc/cgo
parent1d0e078f040c63587ea347ab8e8e73bd534bdee1 (diff)
downloadgolang-a067450a1fb8a60e1f1d3a7a7ca67120f567e7cb.tar.gz
Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH, and also doesn't assume that the build is being run from $GOROOT/src. This is a minimal set of necessary changes to get Go to build happily from the FreeBSD ports collection. R=rsc CC=golang-dev http://codereview.appspot.com/171044 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'misc/cgo')
-rw-r--r--misc/cgo/stdio/Makefile4
-rwxr-xr-xmisc/cgo/stdio/test.bash5
2 files changed, 5 insertions, 4 deletions
diff --git a/misc/cgo/stdio/Makefile b/misc/cgo/stdio/Makefile
index 7ff8c3007..2e3d46631 100644
--- a/misc/cgo/stdio/Makefile
+++ b/misc/cgo/stdio/Makefile
@@ -13,5 +13,5 @@ CLEANFILES+=hello fib chain run.out
include ../../../src/Make.pkg
%: install %.go
- $(GC) $*.go
- $(LD) -o $@ $*.$O
+ $(QUOTED_GOBIN)/$(GC) $*.go
+ $(QUOTED_GOBIN)/$(LD) -o $@ $*.$O
diff --git a/misc/cgo/stdio/test.bash b/misc/cgo/stdio/test.bash
index 82e3f7b45..b8b5f6911 100755
--- a/misc/cgo/stdio/test.bash
+++ b/misc/cgo/stdio/test.bash
@@ -4,7 +4,8 @@
# license that can be found in the LICENSE file.
set -e
-gomake hello fib chain
+GOBIN="${GOBIN:-$HOME/bin}"
+"$GOBIN"/gomake hello fib chain
echo '*' hello >run.out
./hello >>run.out
echo '*' fib >>run.out
@@ -12,4 +13,4 @@ echo '*' fib >>run.out
echo '*' chain >>run.out
./chain >>run.out
diff run.out golden.out
-gomake clean
+"$GOBIN"/gomake clean