]> Cypherpunks repositories - gostls13.git/commitdiff
build: no required environment variables
authorRuss Cox <rsc@golang.org>
Wed, 18 Aug 2010 14:08:49 +0000 (10:08 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 18 Aug 2010 14:08:49 +0000 (10:08 -0400)
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044

148 files changed:
.hgignore
doc/Makefile
doc/code.html
doc/codelab/wiki/Makefile
doc/install.html
doc/progs/run
misc/cgo/gmp/Makefile
misc/cgo/life/Makefile
misc/cgo/stdio/Makefile
misc/dashboard/builder.sh
src/Make.inc.in [new file with mode: 0644]
src/all.bash
src/cmd/cgo/Makefile
src/cmd/ebnflint/Makefile
src/cmd/gc/mkbuiltin
src/cmd/godoc/Makefile
src/cmd/gofmt/Makefile
src/cmd/gofmt/test.sh
src/cmd/goinstall/Makefile
src/cmd/goinstall/main.go
src/cmd/goinstall/make.go
src/cmd/gomake/doc.go [new file with mode: 0644]
src/cmd/gotest/Makefile
src/cmd/gotest/gotest
src/cmd/goyacc/Makefile
src/cmd/hgpatch/Makefile
src/cmd/make.bash
src/env.bash
src/lib9/Makefile
src/make.bash
src/pkg/archive/tar/Makefile
src/pkg/asn1/Makefile
src/pkg/big/Makefile
src/pkg/bufio/Makefile
src/pkg/bytes/Makefile
src/pkg/cmath/Makefile
src/pkg/compress/flate/Makefile
src/pkg/compress/gzip/Makefile
src/pkg/compress/zlib/Makefile
src/pkg/container/heap/Makefile
src/pkg/container/list/Makefile
src/pkg/container/ring/Makefile
src/pkg/container/vector/Makefile
src/pkg/crypto/aes/Makefile
src/pkg/crypto/block/Makefile
src/pkg/crypto/blowfish/Makefile
src/pkg/crypto/hmac/Makefile
src/pkg/crypto/md4/Makefile
src/pkg/crypto/md5/Makefile
src/pkg/crypto/rand/Makefile
src/pkg/crypto/rc4/Makefile
src/pkg/crypto/ripemd160/Makefile
src/pkg/crypto/rsa/Makefile
src/pkg/crypto/sha1/Makefile
src/pkg/crypto/sha256/Makefile
src/pkg/crypto/sha512/Makefile
src/pkg/crypto/subtle/Makefile
src/pkg/crypto/tls/Makefile
src/pkg/crypto/x509/Makefile
src/pkg/crypto/xtea/Makefile
src/pkg/debug/dwarf/Makefile
src/pkg/debug/elf/Makefile
src/pkg/debug/gosym/Makefile
src/pkg/debug/macho/Makefile
src/pkg/debug/proc/Makefile
src/pkg/ebnf/Makefile
src/pkg/encoding/ascii85/Makefile
src/pkg/encoding/base64/Makefile
src/pkg/encoding/binary/Makefile
src/pkg/encoding/git85/Makefile
src/pkg/encoding/hex/Makefile
src/pkg/encoding/pem/Makefile
src/pkg/exec/Makefile
src/pkg/exp/datafmt/Makefile
src/pkg/exp/draw/Makefile
src/pkg/exp/draw/x11/Makefile
src/pkg/exp/eval/Makefile
src/pkg/exp/iterable/Makefile
src/pkg/exp/nacl/av/Makefile
src/pkg/exp/nacl/srpc/Makefile
src/pkg/exp/ogle/Makefile
src/pkg/expvar/Makefile
src/pkg/flag/Makefile
src/pkg/fmt/Makefile
src/pkg/go/ast/Makefile
src/pkg/go/doc/Makefile
src/pkg/go/parser/Makefile
src/pkg/go/printer/Makefile
src/pkg/go/scanner/Makefile
src/pkg/go/token/Makefile
src/pkg/gob/Makefile
src/pkg/hash/Makefile
src/pkg/hash/adler32/Makefile
src/pkg/hash/crc32/Makefile
src/pkg/hash/crc64/Makefile
src/pkg/html/Makefile
src/pkg/http/Makefile
src/pkg/http/pprof/Makefile
src/pkg/image/Makefile
src/pkg/image/jpeg/Makefile
src/pkg/image/png/Makefile
src/pkg/io/Makefile
src/pkg/io/ioutil/Makefile
src/pkg/json/Makefile
src/pkg/log/Makefile
src/pkg/math/Makefile
src/pkg/mime/Makefile
src/pkg/mime/multipart/Makefile
src/pkg/net/Makefile
src/pkg/net/dict/Makefile
src/pkg/net/textproto/Makefile
src/pkg/netchan/Makefile
src/pkg/nntp/Makefile
src/pkg/os/Makefile
src/pkg/os/signal/Makefile
src/pkg/patch/Makefile
src/pkg/path/Makefile
src/pkg/rand/Makefile
src/pkg/reflect/Makefile
src/pkg/regexp/Makefile
src/pkg/rpc/Makefile
src/pkg/rpc/jsonrpc/Makefile
src/pkg/runtime/Makefile
src/pkg/runtime/pprof/Makefile
src/pkg/scanner/Makefile
src/pkg/sort/Makefile
src/pkg/strconv/Makefile
src/pkg/strings/Makefile
src/pkg/sync/Makefile
src/pkg/syscall/Makefile
src/pkg/syslog/Makefile
src/pkg/tabwriter/Makefile
src/pkg/template/Makefile
src/pkg/testing/Makefile
src/pkg/testing/iotest/Makefile
src/pkg/testing/quick/Makefile
src/pkg/testing/script/Makefile
src/pkg/time/Makefile
src/pkg/unicode/Makefile
src/pkg/utf16/Makefile
src/pkg/utf8/Makefile
src/pkg/websocket/Makefile
src/pkg/xml/Makefile
src/sudo.bash
test/bench/timing.sh
test/garbage/Makefile
test/garbage/parser.go
test/run

index e686255af58897ce31bb5d2612a712929344f545..efdc34c10914098337d7e6c11ce8503e0d221b72 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -14,9 +14,10 @@ syntax:glob
 core
 _obj
 _test
+y.tab.[ch]
 doc/htmlgen
+src/Make.inc
 src/cmd/6a/6a
-y.tab.[ch]
 src/cmd/?l/enam.c
 src/cmd/gc/builtin.c
 src/cmd/gc/mkbuiltin1
index 0abb881b17a87b45acfbe5287446a18b3a32f6e2..fbc4286d3cd720da9a79ff57d543abf2f993d77a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
 
 TARG=htmlgen
 GOFILES=\
index 14bb6f9feac67b8f36f6062b6a9ee2aa8a7529e6..8e72d5ace25249ff6bad6105f8def2be0b299905 100644 (file)
@@ -64,7 +64,7 @@ is illustrated by <a href="../src/pkg/container/vector/Makefile"><code>src/pkg/c
 </p>
 
 <pre>
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=container/vector
 GOFILES=\
@@ -80,7 +80,7 @@ Outside the Go source tree (for personal packages), the standard form is
 </p>
 
 <pre>
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
 
 TARG=mypackage
 GOFILES=\
@@ -98,6 +98,14 @@ even if <code>$(GOROOT)</code> contains spaces.
 This makes it easy for programmers to try Go.
 </p>
 
+<p>
+If you have not set <code>$GOROOT</code> in your environment,
+you must run <code>gomake</code> to use this form of makefile.
+<code>Gomake</code> also takes care to invoke GNU Make
+even on systems where it is installed as <code>gmake</code>
+rather than <code>make</code>.
+</p>
+
 <p>
 <code>TARG</code> is the target install path for the package,
 the string that clients will use to import it.
@@ -131,8 +139,8 @@ cd $GOROOT/src/pkg
 </pre>
 <p>
 to update the dependency file <code>Make.deps</code>.
-(This happens automatically each time you run <code>make all</code>
-or <code>make build</code>.)
+(This happens automatically each time you run <code>all.bash</code>
+or <code>make.bash</code>.)
 </p>
 
 <p>
@@ -259,7 +267,7 @@ Finally, the <code>Makefile</code>:
 </p>
 
 <pre>
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
 
 TARG=numbers
 GOFILES=\
@@ -269,13 +277,13 @@ include $(GOROOT)/src/Make.pkg
 </pre>
 
 <p>
-Running <code>make install</code> will build and install the package to
+Running <code>gomake install</code> will build and install the package to
 the <code>$GOROOT/pkg/</code> directory (it can then be used by any
 program on the system).
 </p>
 
 <p>
-Running <code>make test</code> (or just running the command
+Running <code>gomake test</code> (or just running the command
 <code>gotest</code>) will rebuild the package, including the
 <code>numbers_test.go</code> file, and then run the <code>TestDouble</code>
 function. The output "<code>PASS</code>" indicates that all tests passed
index 76ab5c5bca1aca53e482c56cf5c995e49debce4d..8d09cc554720e46c38d2fd9fa72a967b71a3141a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../src/Make.$(GOARCH)
+include ../../../src/Make.inc
 
 all: index.html
 
index 2c1ff2157601090b64085fd5919a73ceead65366..601edc515a139b90db88622114119455b4a7072a 100644 (file)
@@ -20,15 +20,35 @@ compiler using the GCC back end, see
 <h2>Environment variables</h2>
 
 <p>
-The Go compilation environment depends on three environment variables plus one optional variable:
+The Go compilation environment can be customized by five environment variables.
+None are required by the build, but you may wish to set them
+to override the defaults.
 </p>
 
 <dl>
 <dt>
        <code>$GOROOT</code>
 </dt>
-<dd>The root of the Go tree.  Typically this is <code>$HOME/go</code>
-       but it can be any directory.
+<dd>
+       The root of the Go tree, often <code>$HOME/go</code>.
+       This defaults to the parent of the directory where <code>all.bash</code> is run.
+       Although this variable is optional, the examples and typescripts below
+       use it as shorthand for the location where you installed Go.
+       If you choose not to set <code>$GOROOT</code>, you must
+       run <code>gomake</code> instead of <code>make</code> or <code>gmake</code>
+       when developing Go programs using the conventional makefiles.
+</dd>
+
+<dt>
+       <code>$GOROOT_FINAL</code>
+</dt>
+<dd>
+       The value assumed by installed binaries and scripts when
+       <code>$GOROOT</code> is not set.
+       It defaults to the value used for <code>$GOROOT</code>.
+       If you want to build the Go tree in one location
+       but move it elsewhere after the build, set 
+       <code>$GOROOT_FINAL</code> to the eventual location.
 </dd>
 
 <dt>
@@ -36,6 +56,10 @@ The Go compilation environment depends on three environment variables plus one o
 </dt>
 <dd>
        The name of the target operating system and compilation architecture.
+       These default to the local system's operating system and
+       architecture.
+
+       <p>
        Choices for <code>$GOOS</code> are <code>linux</code>,
        <code>freebsd</code>,
        <code>darwin</code> (Mac OS X 10.5 or 10.6),
@@ -74,11 +98,10 @@ The Go compilation environment depends on three environment variables plus one o
        <td></td><td><code>nacl</code></td> <td><code>386</code></td>
        </tr>
        </table>
-       <p>
 </dd>
 
 <dt>
-<code>$GOBIN</code> (optional)
+<code>$GOBIN</code>
 </dt>
 <dd>
        The location where binaries will be installed.
@@ -88,7 +111,7 @@ The Go compilation environment depends on three environment variables plus one o
 </dd>
 
 <dt>
-<code>$GOARM</code> (optional, arm, default=6)
+<code>$GOARM</code> (arm, default=6)
 </dt>
 <dd>
        The ARM architecture version the runtime libraries should target.
@@ -103,18 +126,24 @@ The Go compilation environment depends on three environment variables plus one o
 Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the
 <em>target</em> environment, not the environment you are running on.
 In effect, you are always cross-compiling.
+By architecture, we mean the kind of binaries
+that the target environment can run:
+an x86-64 system running a 32-bit-only operating system
+must set <code>GOARCH</code> to <code>386</code>,
+not <code>amd64</code>.
 </p>
 
 <p>
-Set these variables in your shell profile (<code>$HOME/.bashrc</code>,
+If you choose to override the defaults,
+set these variables in your shell profile (<code>$HOME/.bashrc</code>,
 <code>$HOME/.profile</code>, or equivalent). The settings might look 
 something like this:
 </p>
 
 <pre>
 export GOROOT=$HOME/go
-export GOARCH=amd64
-export GOOS=linux
+export GOARCH=amd64  # optional
+export GOOS=linux    # optional
 </pre>
 
 <p>
@@ -224,16 +253,21 @@ $ ./all.bash
 </pre>
 
 <p>
-If all goes well, it will finish by printing
+If all goes well, it will finish by printing output like:
 </p>
 
 <pre>
 --- cd ../test
 N known bugs; 0 unexpected bugs
+
+---
+Installed Go for darwin/amd64 in /Users/you/go; the compiler is 6g.
 </pre>
 
 <p>
-where <var>N</var> is a number that varies from release to release.
+where <var>N</var> is a number that varies from release to release
+and the details on the last line will reflect the operating system,
+architecture, and root directory used during the install.
 </p>
 
 <h2>Writing programs</h2>
index 07bc141dffdac2dcdc469aaf5204c3172c3ff058..19cc425650396c64ba33d647a2b2737b180ef2f4 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 
 GOBIN="${GOBIN:-$HOME/bin}"
 
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake -f ../../src/Make.inc go-env)
 
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
index ad5db33c2f42a72c6c39a12e78d020cd58725933..fc6209f279d7b9262f036aac47e26da694e992c4 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../src/Make.$(GOARCH)
+include ../../../src/Make.inc
 
 TARG=gmp
 
index cbcdc992757b78ef83c5e8a75fcd25cef6944c26..b50a5ee7d29c92de6eea32b641a67a6f06f57fbc 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../src/Make.$(GOARCH)
+include ../../../src/Make.inc
 
 TARG=life
 
index a0093ff5293d5961ccd568c0044d0e1e9c4c74de..08e29393100f903280df8bdae723fd7a7335e86e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../src/Make.$(GOARCH)
+include ../../../src/Make.inc
 
 TARG=stdio
 CGOFILES=\
index cd9ff070388ad4374698087ef946329d3b0a85fb..4a8d117bfc98c360329393aa3b4900eabdd0fd34 100644 (file)
@@ -31,7 +31,7 @@ fi
 
 export PATH=$PATH:`pwd`/candidate/bin
 export GOBIN=`pwd`/candidate/bin
-export BAKED_GOROOT=/usr/local/go
+export GOROOT_FINAL=/usr/local/go
 
 while true ; do (
     cd go || fatal "Cannot cd into 'go'"
diff --git a/src/Make.inc.in b/src/Make.inc.in
new file mode 100644 (file)
index 0000000..c3e4a45
--- /dev/null
@@ -0,0 +1,72 @@
+# Copyright 2009 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# Makefile included by all other makefiles.
+# The build converts Make.inc.in to Make.inc.
+# Only make changes in Make.inc.in.
+
+# Set up GOROOT, GOARCH, GOOS if needed.
+ifeq ($(GOROOT),)
+GOROOT:=@@GOROOT@@
+endif
+
+ifeq ($(GOOS),)
+GOOS:=${shell uname | tr A-Z a-z}
+endif
+
+ifeq ($(GOOS),darwin)
+else ifeq ($(GOOS),freebsd)
+else ifeq ($(GOOS),linux)
+else ifeq ($(GOOS),nacl)
+else ifeq ($(GOOS),windows)
+else
+$(error Invalid $$GOOS '$(GOOS)'; must be darwin, freebsd, linux, nacl, or windows)
+endif
+
+ifeq ($(GOARCH),)
+ifeq ($(GOOS),darwin)
+# Even on 64-bit platform, darwin uname -m prints i386.
+# Check for amd64 with sysctl instead.
+GOARCH:=${shell if sysctl machdep.cpu.extfeatures | grep EM64T >/dev/null; then echo amd64; else uname -m | sed 's/i386/386/'; fi}
+else
+# Ask uname -m for the processor.
+GOARCH:=${shell uname -m | sed 's/^..86$$/386/; s/^.86$$/386/; s/x86_64/amd64/'}
+endif
+endif
+
+ifeq ($(GOARCH),386)
+O:=8
+else ifeq ($(GOARCH),amd64)
+O:=6
+else ifeq ($(GOARCH),arm)
+O:=5
+else
+$(error Invalid $$GOARCH '$(GOARCH)'; must be 386, amd64, or arm)
+endif
+
+# Save for recursive make.
+export GOARCH GOOS
+
+AS=${O}a
+CC=${O}c
+GC=${O}g
+LD=${O}l
+OS=568vq
+CFLAGS=-FVw
+
+go-env:
+       @echo export GOARCH=$(GOARCH)
+       @echo export GOOS=$(GOOS)
+       @echo export O=$O
+       @echo export AS="$(AS)"
+       @echo export CC="$(CC)"
+       @echo export GC="$(GC)"
+       @echo export LD="$(LD)"
+       @echo export OS="$(OS)"
+       @echo export CFLAGS="$(CFLAGS)"
+       @echo MAKE_GO_ENV_WORKED=1
+
+# Don't let the targets in this file be used
+# as the default make target.
+.DEFAULT_GOAL:=
index 00c1ca74dd978b409674d80c685ec7a967535699..4a98fe9f6bd94a18e9e2487bb297349163ed6ed5 100755 (executable)
@@ -4,5 +4,11 @@
 # license that can be found in the LICENSE file.
 
 set -e
-bash make.bash
+if [ ! -f make.bash ]; then
+       echo 'all.bash must be run from $GOROOT/src' 1>&2
+       exit 1
+fi
+. ./make.bash
 bash run.bash --no-rebuild
+installed  # function defined by make.bash
+
index 34ca3dd46e436dfdc9c94ce8893cbd40197acb3a..5458c3e4f483639310f8a3789f24f06a2f6e9d4c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=cgo
 GOFILES=\
index 8cb9fd821d8eb87bcadc966ba97de4838a7e6a56..77279db245fa1717f775decb1527a4c7af627025 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=ebnflint
 GOFILES=\
index 13309ec320f87c452094fcc903e5d35ff341338b..e29487e4bcef376f0770117a088fa63b31a7e736 100755 (executable)
@@ -12,7 +12,7 @@ set -e
 
 GOBIN="${GOBIN:-$HOME/bin}"
 
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake -f ../../Make.inc go-env)
 if [ -z "$GC" ]; then
        echo 'missing $GC - maybe no Make.$GOARCH?' 1>&2
        exit 1
index d799219dd2b57f0714b1dd149dbb8b7c4f3b1b92..106f46effa53d942c443369595689b223f630050 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=godoc
 GOFILES=\
index 2294fd1dbf5a2298b48b5aaa2a23a1048c2f2dbf..43434a5659467f04523319c6b34ba429bef37965 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=gofmt
 GOFILES=\
index 133cc8a64fd45e3c46dbb73baf09e69f2d14d596..36f7d6e48e801d9624dbd81fd0b57869a70508e1 100755 (executable)
@@ -3,7 +3,9 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-. "$GOROOT"/src/Make.$GOARCH
+GOBIN="${GOBIN:-$HOME/bin}"
+
+eval $("$GOBIN"/gomake --no-print-directory -f ../../Make.inc go-env)
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 1
index cf4728401ae6aafec600b9694a5930fef10d49a2..6ddb32be723bad7294a91f3f26571e1a93590e3e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=goinstall
 GOFILES=\
index 5d2af2e7ca5523a3eb5ee0d798a3199c41bed952..ffa6eb7afca82c07307e83c5cf43d86969dbe78e 100644 (file)
@@ -14,6 +14,7 @@ import (
        "io"
        "os"
        "path"
+       "runtime"
        "strings"
 )
 
@@ -28,7 +29,7 @@ var (
        errors  = false
        gobin   = os.Getenv("GOBIN")
        parents = make(map[string]string)
-       root    = os.Getenv("GOROOT")
+       root    = runtime.GOROOT()
        visit   = make(map[string]status)
 
        reportToDashboard = flag.Bool("dashboard", true, "report public packages at "+dashboardURL)
index c15709b313c330f9c566a5b086bf01b5629c3e6e..769c8741595e1c491500f0401def2dd9d1f95388 100644 (file)
@@ -53,7 +53,7 @@ type makedata struct {
 }
 
 var makefileTemplate = template.MustParse(`
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
 
 TARG={pkg}
 GOFILES=\
diff --git a/src/cmd/gomake/doc.go b/src/cmd/gomake/doc.go
new file mode 100644 (file)
index 0000000..2f35fd9
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2010 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+The gomake command runs GNU make with an appropriate environment
+for using the conventional Go makefiles.  If $GOROOT is already
+set in the environment, running gomake is exactly the same
+as running make (or, on BSD systems, running gmake).
+
+Usage: gomake [ target ... ]
+
+Common targets are:
+
+       all (default)
+               build the package or command, but do not install it.
+
+       install
+               build and install the package or command
+
+       test
+               run the tests (packages only)
+
+       bench
+               run benchmarks (packages only)
+
+       clean
+               remove object files from the current directory
+
+       nuke
+               make clean and remove the installed package or command
+
+See http://golang.org/doc/code.html for information about
+writing makefiles.
+*/
+package documentation
index b20b1daffd8535f8f1272792d3ec0cfad64eb24c..8360fd184148dd1c494a4a135bc6749aba7558ff 100644 (file)
@@ -5,10 +5,13 @@
 include ../../Make.conf
 
 TARG=gotest
+GOROOT_FINAL?=$(GOROOT)
 
 clean:
        @true
 
 install: $(TARG)
        ! test -f "$(GOBIN)"/$(TARG) || chmod u+w "$(GOBIN)"/$(TARG)
-       cp $(TARG) "$(GOBIN)"/$(TARG)
+       sed 's`@@GOROOT@@`$(GOROOT_FINAL)`' gotest >"$(GOBIN)"/$(TARG)
+       chmod +x "$(GOBIN)"/$(TARG)
+
index cea2ab9058581735dee8b7ee5318d2bd1fb9a3d0..9995496ad603bc17f53ea5ad7cd8f21a8c97e3fb 100755 (executable)
@@ -16,14 +16,15 @@ export LC_CTYPE=C
 
 GOBIN="${GOBIN:-$HOME/bin}"
 
-_GC=$GC        # Make.$GOARCH will overwrite this
+_GC=$GC        # Make.inc will overwrite this
 
 if [ ! -f [Mm]akefile ]; then
        echo 'please create a Makefile for gotest; see http://golang.org/doc/code.html for details' 1>&2
        exit 2
 fi
 
-. "$GOROOT"/src/Make.$GOARCH
+export GOROOT=${GOROOT:-"@@GOROOT@@"}
+eval $("$GOBIN"/gomake --no-print-directory -f "$GOROOT"/src/Make.inc go-env)
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 2
index 77ac918bc98a4e04b2efe15ba3d6c83937456a85..54b8f3360f03773838a94595ca1c966bc5baf720 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=goyacc
 GOFILES=\
index f7d64bc123b7258f4d825b1d74a0a629af36a987..1ef98d7f97e627d94066273e4ee5e9a2cde99d62 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=hgpatch
 GOFILES=\
index d0fda7d1835bf0eb2fee63c56331fbd0f58ecbc6..4ee22776b34c789baf4b41698e44bc6b54e5a302 100755 (executable)
@@ -9,7 +9,7 @@ bash clean.bash
 
 GOBIN="${GOBIN:-$HOME/bin}"
 
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake --no-print-directory -f ../Make.inc go-env)
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 1
index 2a63e6480620af4de3225eedec4c954fc4c83905..fc6f5bea63797a349118e456b965fd68eadeccab 100644 (file)
@@ -16,11 +16,13 @@ elif ! test -d "$GOBIN"; then
        echo 'create it or set $GOBIN differently' 1>&2
        exit 1
 fi
+export GOBIN
+
+export GOROOT=${GOROOT:-$(cd ..; pwd)}
 
-GOROOT=${GOROOT:-$(cd ..; pwd)}
 if ! test -f "$GOROOT"/include/u.h
 then
-       echo '$GOROOT is not set correctly or not exported' 1>&2
+       echo '$GOROOT is not set correctly or not exported: '$GOROOT 1>&2
        exit 1
 fi
 
@@ -30,26 +32,23 @@ fi
 DIR1=$(cd ..; pwd)
 DIR2=$(cd $GOROOT; pwd)
 if [ "$DIR1" != "$DIR2" ]; then
-       echo 'Suspicious $GOROOT: does not match current directory.' 1>&2
+       echo 'Suspicious $GOROOT '$GOROOT': does not match current directory.' 1>&2
        exit 1
 fi
 
-GOARCH=${GOARCH:-$(uname -m | sed 's/^..86$/386/; s/^.86$/386/; s/x86_64/amd64/')}
-case "$GOARCH" in
-amd64 | 386 | arm)
-       ;;
-*)
-       echo '$GOARCH is set to <'$GOARCH'>, must be amd64, 386, or arm' 1>&2
-       exit 1
-esac
+MAKE=make
+if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
+       MAKE=gmake
+fi
 
-GOOS=${GOOS:-$(uname | tr A-Z a-z)}
-case "$GOOS" in
-darwin | freebsd | linux | windows | nacl)
-       ;;
-*)
-       echo '$GOOS is set to <'$GOOS'>, must be darwin, freebsd, linux, windows, or nacl' 1>&2
-       exit 1
-esac
+# Tried to use . <($MAKE ...) here, but it cannot set environment
+# variables in the version of bash that ships with OS X.  Amazing.
+eval $($MAKE --no-print-directory -f Make.inc.in go-env | egrep 'GOARCH|GOOS|GO_ENV')
 
-export GOBIN GOROOT GOARCH GOOS
+# Shell doesn't tell us whether make succeeded,
+# so Make.inc generates a fake variable name.
+if [ "$MAKE_GO_ENV_WORKED" != 1 ]; then
+       echo 'Did not find Go environment variables.' 1>&2
+       exit 1
+fi
+unset MAKE_GO_ENV_WORKED
index 10c4b1640a9a2833ce21ed2f37533e2cad3381ac..de0900012f063cd852dfbcf69e52f5efbeef3289 100644 (file)
@@ -104,7 +104,7 @@ HFILES=\
        "$(GOROOT)"/include/u.h\
        "$(GOROOT)"/include/libc.h\
 
-BAKED_GOROOT?=$(GOROOT)
+GOROOT_FINAL?=$(GOROOT)
 
 install: $(LIB)
        cp $(LIB) "$(GOROOT)/lib"
@@ -119,7 +119,7 @@ $(LIB): $(OFILES)
        $(CC) -c $(CFLAGS) $<
 
 goos.$O: goos.c
-       $(CC) -c $(CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(BAKED_GOROOT)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<
+       $(CC) -c $(CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<
 
 clean:
        rm -f *.$O *.6 6.out $(LIB)
index b95635b5655c0ff8817032e92c5e6029ccd7d436..6124dbfb795bca4b4a2917cd384c225c0c527355 100755 (executable)
@@ -4,8 +4,16 @@
 # license that can be found in the LICENSE file.
 
 set -e
+if [ ! -f env.bash ]; then
+       echo 'make.bash must be run from $GOROOT/src' 1>&2
+       exit 1
+fi
 . ./env.bash
 
+GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
+rm -f Make.inc
+sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc
+
 MAKEFLAGS=${MAKEFLAGS:-"-j4"}
 export MAKEFLAGS
 unset CDPATH   # in case user has it set
@@ -17,11 +25,11 @@ sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc
 chmod +x "$GOBIN"/quietgcc
 
 rm -f "$GOBIN"/gomake
-MAKE=make
-if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
-       MAKE=gmake
-fi
-(echo '#!/bin/sh'; echo 'exec '$MAKE' "$@"') >"$GOBIN"/gomake
+(
+       echo '#!/bin/sh'
+       echo 'export GOROOT=${GOROOT:-'$GOROOT_FINAL'}'
+       echo 'exec '$MAKE' "$@"'
+) >"$GOBIN"/gomake
 chmod +x "$GOBIN"/gomake
 
 if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then
@@ -73,9 +81,26 @@ do
        esac
 done
 
-case "`uname`" in
-Darwin)
-       echo;
-       echo %%% run sudo.bash to install debuggers
+# Print post-install messages.
+# Implemented as a function so that all.bash can repeat the output
+# after run.bash finishes running all the tests.
+installed() {
+       eval $("$GOBIN"/gomake -f Make.inc go-env)
        echo
-esac
+       echo ---
+       echo Installed Go for $GOOS/$GOARCH in "$GOROOT".
+       echo Installed commands in "$GOBIN".
+       echo The compiler is $GC.
+       if [ "$(uname)" = "Darwin" ]; then
+               echo
+               echo On OS X the debuggers must be installed setgrp procmod.
+               echo Read and run ./sudo.bash to install the debuggers.
+       fi
+       if [ "$GOROOT_FINAL" != "$GOROOT" ]; then
+               echo
+               echo The binaries expect "$GOROOT" to be copied or moved to "$GOROOT_FINAL".
+       fi
+}
+
+(installed)  # run in sub-shell to avoid polluting environment
+
index 6a29de8f7594e2f541dfd65420ecb8506b278190..8897e883eb103e05632e1215a018e76a83c3559f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=archive/tar
 GOFILES=\
index 40b76b8497bf76b982c5ac87edcdeeb18088fc02..6b7770e820f33924c23569f00fb298d7f3da7cc2 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=asn1
 GOFILES=\
index 7a4311dca49202edf90036a63b1b76149f85cd9d..3d4b56d789ac8e76afcee0777943a84f97514fc0 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=big
 GOFILES=\
index 1f5fc349bd614450e580ff43f2beecd24e9617dd..85430e8e81ff8a15778c1c58d93a85cd574e2a78 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=bufio
 GOFILES=\
index d50e624d6eb971c9c3d8146301fff6ba0980703a..03395c7a4c9a83ec2963f1a96d23f482f84c5a43 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=bytes
 GOFILES=\
index 1936fbda138e366bbc9ca9076cc7b332775699c5..486caace46d94dca27c0fe75bd4628ec8554d376 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=cmath
 
index 6f9ee74d4d0cbb70a3b81147e92ca30740bc2de0..197828a92656d1033aefa5fe03e11c40b0c6950f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=compress/flate
 GOFILES=\
index bb4705a8f496109c2c975dbfa4b2e8c79af9233d..b671fc72c09f1aca65279efed27f5b6245bef449 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=compress/gzip
 GOFILES=\
index 4cfda4f1b84ed1bc9217a34250c88eda4037a327..791072d34968fe59e9560b73129d2c3e09ac5008 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=compress/zlib
 GOFILES=\
index 244ebae063dbd59e99974f3839b7863fa430df3a..4291d1122302cff6597857d9be20c10a7716db60 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=container/heap
 GOFILES=\
index 2d5b357152a1e026920d48042f6308d60330df8f..7fcd5f99ae239b319f5a2a56a9b60f084cf3426a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=container/list
 GOFILES=\
index 4755bab079869f20b22be1d5a303afea4bba9dc7..fb0900774adf7a5d10d2eed16cecbc7e411498bb 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=container/ring
 GOFILES=\
index 1eb310c6d890e3469c6ecb3a61806b4e786d3071..f6b50156fa538c5dbe90fab767fe6afdab29f6cd 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=container/vector
 GOFILES=\
index 07d759b4b6487f74855403605f20d94134c84d67..9dc846ee3a7eedf2e83bddc8acd0056a5c4c152e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/aes
 GOFILES=\
index 25c3483aebbd6a0ff78da3987a39ffaab767d307..71c7aff640dcf825d0ea672eeb9daecb27bfc92e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/block
 GOFILES=\
index c2999cc1d1dd8a9262ff46c4924b3ca48f830e45..f370ab28ba3233cd103656014a145c957fc96b0a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/blowfish
 GOFILES=\
index d1a6bfc2bca23f1f9cda15bf8e300e39bdffc790..cc69abf60850efb51202e02e9a0a441800d9ea35 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/hmac
 GOFILES=\
index 5fff2dd8fd75ce2a769945502e827237424059a7..eef05ab704d79aa91c4d0531aa7c239977e41569 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/md4
 GOFILES=\
index 7f37f6a33a2ca62f38411b06f98a7b361f7b6e26..5cde3e6d67e52b0270d4d9fc41a6d6a1325ca61d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/md5
 GOFILES=\
index 21812598ccfb52d3e54333bccc205c024c3382d2..c24429ad4fc0e79a4d95ed57b2ee7966c12b38c6 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/rand
 
index 7827b0817849059a5be780febff78bbc0f935de7..50a3b7972a814d913d56252d1b60f576a732bb27 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/rc4
 GOFILES=\
index 109e68edac09697b9fb99e3444c01fc1e3d0d76c..7e529457de3023a3a987f62ccd0729c243b94b4d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/ripemd160
 GOFILES=\
index e4d81bc520b0d632bda4eb1774a60c4a14548689..ff26ca6f2e08243a973842ba1f4ee55ec8423144 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/rsa
 GOFILES=\
index f3422dd84f67e534adfe8bce9fa5215d1f5f0ad3..81ac38c0b29481c6d4d4aa2129acff4349de562e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/sha1
 GOFILES=\
index 9efbc47921c010fee83d6311cafb059ed4c197d7..97fe4d8e663076bc36e390fb6cf2eb04ac40411e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/sha256
 GOFILES=\
index cf52732a4f30dd6b1b32a1b5103350110bd81b78..2f7633fa32dae05639d359d58438ac38c9a3ad95 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/sha512
 GOFILES=\
index fa5f7ef42c79992fa9ab94a320371e1b5367ebc0..08d8bbfa0622a1ed404b3943ca4a4a3fe8834ffa 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/subtle
 GOFILES=\
index 5e25bd43adc846eff484940a301e3dad7d64e18b..86f9695c071be4c63d92a96de7bceaa0675c5791 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/tls
 GOFILES=\
index b2ecfdc01d7066dec17f1c9aaa34506fc82a0927..329a61b7c35216ee6310cd467e7991b8fcb54b3e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/x509
 GOFILES=\
index 74cc1b0dcdf550e3e4efe7d5d38cafa201d6b58e..301621168c3683b7e3870961b168f0ec239c3cdf 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=crypto/xtea
 GOFILES=\
index a626513c7c5fc375fa6d58d22fee405e6a18c931..c4203188e0b699208bf306c0a4e26bf9dcebf91b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=debug/dwarf
 GOFILES=\
index 931f9d24d4bc3798083b2d9b316027e5afe16ed1..dd431f653c97d4a93e54d5e8df26aa8834e4aeee 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=debug/elf
 GOFILES=\
index ac16b4ceeaf31842807ad928ae0f104d79e63660..3c0d8c44093b6e2bd8b18704c19395a80f9616c9 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=debug/gosym
 GOFILES=\
index d34aacf54bb1fa42f7ecd008f409c3252f4f8973..5fbbf1efe52dedb48d97e77bf1ddb971ccaa3af0 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=debug/macho
 GOFILES=\
index 5444ec0dbbcd40cf4f51ffdd026846a9e03adea7..c6d879836b2fdb8f9018952fcde2f5359ae36f0a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=debug/proc
 GOFILES=\
index 4a75c743233fc1c4dbbc63af259a41db34de637d..f5555d2720497f1c522a2047fe9adc6dd8ece815 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=ebnf
 GOFILES=\
index 7ec14bd1aadedf1f6c292ede419ef6835a911dde..412383efd595dc624bf4f55e4a1460bb6fd6c811 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/ascii85
 GOFILES=\
index 8503b16633dbda1adf17ce79ac2209728fb877c9..2f54ed83954b684b384fb9ce9b3ce7cee9db999b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/base64
 GOFILES=\
index 23d4d6d436ea23c7acdffbbf0f6fca56224a0930..dc46abe909dc4307b662d1da9b720eaebc6f811c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/binary
 GOFILES=\
index 09dd96f32e48047c8e769dc72aa2dc4b140f0ac8..fbd003454b3b169c2992cdbf9cf69fe313c01c1e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/git85
 GOFILES=\
index d6849d9a56e75dc6ee744076be0fef77eef3f7ee..22049f43b6224cb68e53a0c4b71ef6b0f365452d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/hex
 GOFILES=\
index 79490a57d923832c77bf4d676a84cc552b9d9c3c..527670380bce778a3dc418829a9a43ab41a959d3 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=encoding/pem
 GOFILES=\
index 9d88b8d8aa737842c202cd6370833d66ab4b433f..bffc1bf36105ee203cd0a4738b646c8585016a3d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=exec
 GOFILES=\
index 40543b1950acbb073940d321464e729680a8e6d6..aa94538975e126fdbc6e3f2c81314f76f9a70af6 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=exp/datafmt
 GOFILES=\
index 4389a294ce23708add6a36873b45bc5f8b40e7c8..6f0f0b2f5f9e89ab7f9d743af8c6b8c7f355ac29 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=exp/draw
 GOFILES=\
index d4e65ca730c30a71d6e27d351feb9df4ea3c51fe..205b3a65ba489b938f6f8f8a0af6661e4f51c28d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../../Make.$(GOARCH)
+include ../../../../Make.inc
 
 TARG=exp/draw/x11
 GOFILES=\
index 50d8a175ed32f6f550bd34dbcce47f059dc1a7c8..a623d0fd460956c0f39ecd7409486cad68e6a2e3 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=exp/eval
 GOFILES=\
index 9adf714daab44ca373de7c3e0b5375e1f2133ba9..cf95dc5adfd13ef83e3b51bd7df6c2efd68d9e19 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=exp/iterable
 GOFILES=\
index d966078ec7d7fa6e344548f5d1afe9e639068a2e..c75f351c3688056a474bd41a11a60f9b2379b135 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../../Make.$(GOARCH)
+include ../../../../Make.inc
 
 TARG=exp/nacl/av
 GOFILES=\
index 7dda292f5e8d9273bc81264a79c095634151f1df..c89997d4babb507e7bca19f324a812533451c210 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../../Make.$(GOARCH)
+include ../../../../Make.inc
 
 TARG=exp/nacl/srpc
 GOFILES=\
index b701afd9e101cbd8397945269c4f34f68aa3307a..1d1d78289eeaf8ffbfcd320662fc4a63bec880be 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=exp/ogle
 GOFILES=\
index 5448917393c563cb4b0afd36b0e9285681766941..5619630d174d36431ab3ea2190fa560863859e2b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=expvar
 GOFILES=\
index 3ffbea83c22d324850496708a4d9b918b44fbf01..3408ca47458bcac3390f0aad1be0db443e30c62d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=flag
 GOFILES=\
index 81a756d3cb986bc3c0b53a0c93b3da46e19e5e33..44b48bc67d16037874ce1fbbfc1c336d4a163ea6 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=fmt
 GOFILES=\
index 9b5c904c19fb36a053c83b87a1884c9f5ff697ba..d95210b27106d284f5004684b6021ce3d5351b68 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/ast
 GOFILES=\
index 1558ac30a06463d54d528415697e884813a1b50d..a5152c79376e423428573ac07b1aa9bf3a4fc562 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/doc
 GOFILES=\
index d9b52a7d9f7af581f739dc4f6bd8b3514bd1e515..d301f41eb16ab722dde1551bc8d48b13351cd1b5 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/parser
 GOFILES=\
index a0fe22e42c882a78e93271258de4295fcaf4e698..6a71efc9356c466ed1915fceb458f2500086484f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/printer
 GOFILES=\
index 70d21a972564d3ec1a281cf4a3813c88fbc21816..453faac005668396bcefeefccb63d810a771a2d3 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/scanner
 GOFILES=\
index 629196c5db008548acee202e4bc0fd4935e6906b..7d3257b0aef283ed5394af0d1491c643aa02ea2f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=go/token
 GOFILES=\
index 1091adb01f07a4847736a4c0c3eb70a78d649432..ddbea3e686b2cf3f66eea62847312072fa686900 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=gob
 GOFILES=\
index aaa641f7ca7a93a3f276f5a79f13c022f04b0269..56071cb33995fe2ed1cd2bce982b6cc3aa701276 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=hash
 GOFILES=\
index 6f6d66fd07b8f3e704449ad8aeb13ee7244a30f4..38ce537ba32e850a97395324998b90038f2f7cd8 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=hash/adler32
 GOFILES=\
index 071d89823ee6b809f672e56d6697ab6d5f652631..31b205185c3ac71a061842683df40acd178ffd8b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=hash/crc32
 GOFILES=\
index 01b755b3ec0696b461a2310e85da2e0b865a85ad..5f6c3de69aaa934e919a34e2dcdd7cfae57297db 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=hash/crc64
 GOFILES=\
index 63000e01b4a92b87fb527597375131a2c37eda30..4bbd98a9368c7f70b80806d6281207e69820e605 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=html
 GOFILES=\
index 235ff0279ef4fbf94fe0c1af2faf341a17a19a28..7e4f80c2823d11d44bb0618529bef338f87c40c4 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=http
 GOFILES=\
index e0315112fe1f9f1c3d09d7b72bcac061ec8ee4c1..5858a0efa77b39a9a2b9da630ef5b29e1dbb0510 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=http/pprof
 GOFILES=\
index 9015ed6ebb712aba8df73c7d4f8da2121f78b7dd..739ad804b9d8e3ed331d00d8892e2bf0ffeb7941 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=image
 GOFILES=\
index c84811d6ada916f8d62d3d982d3e847612e6215c..82d04c402def737c9126a1b413e8ae02b8534e96 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
 
 TARG=image/jpeg
 GOFILES=\
index 3ba0f44d343f17e70d4b3686b1da2a87f676bf9e..4101f77e1b571541d363b82e31416c911a3664f6 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=image/png
 GOFILES=\
index 837888d5c1906a3a746108f7468e896d6fc7320a..9786002f0956e031756ae978ed9d749a3e17ca26 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=io
 GOFILES=\
index 77b75bcec671203ea4bbae43e0a3a3f2c9518a10..d406d4b7dddc4cbb6d1069a2ed4161a528a43064 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=io/ioutil
 GOFILES=\
index fa34bfd182cef86e1ee3788ba22992dde49cfb5e..4e5a8a1398ae8d22e1e5fc2688dc6af21ad2a611 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=json
 GOFILES=\
index 402be03bcc26c2ea96b3676a1b86386d43c725d4..da72216af0bda36f990da6e9e96c90891c321687 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=log
 GOFILES=\
index af1b535a8fee9ac3d5f0aacb9e43cea63336784a..c5af69eb7e05d6cc524310278ffb2173081fbd99 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=math
 
index 1f1296b767461958e140a65f811b46d42f4d43d9..901ed6f8ed368348686fbde8ac67b8f9bcf96754 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=mime
 GOFILES=\
index 0e6ee42dcbf6dee847eb73d9518cd0edb833d4c0..5a7b98d034c8008ec2dcc1c9b5068ef5e5f4dc2b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=mime/multipart
 GOFILES=\
index a69f3877e7b59ffdd7618f38eac597d12711aae9..658bc89c750fe6f5e21fff30303558e8a4378ccd 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=net
 GOFILES=\
index 44c2d7a7c421fe59940a0ed2f58bd52c2f0cbd98..eaa9e65313d2bd94a640c2286fa17897f627d9e7 100644 (file)
@@ -1,4 +1,4 @@
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=net/dict
 GOFILES=\
index b5b51f66c1c1e1afa270bbf10a2e6b101e6d76c2..7897fa711e77f1492519a29bf325af5ed17d8916 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=net/textproto
 GOFILES=\
index a8a5c6a3caba59527886055c0294cd3f4776dd2e..9b9fdcf59f3f767b2d69c932b54350b0ecbaeccd 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=netchan
 GOFILES=\
index 3cf3164ce3e1ed2dba6a3fee196676688ca37685..ce5e447555412d35a22dbb667269b7c799a6d039 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=nntp
 GOFILES=\
index f1ad9af0705263a98ca87c2a905ab9669eb98a99..0b0881c0ac2f425bf1c0f19b20ae101be4dca14a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=os
 GOFILES=\
index 5a245464a05b23dd72274de806ce711db725b3f2..013b91a8530cc8c8a93de8f2613964724cc54b31 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=os/signal
 GOFILES=\
index 1666345c63f8a58d96f22168d0074a3249e6c7ab..32db7bdc80639ce1f5e3bbd0a48a3bab23487cc5 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=patch
 GOFILES=\
index 9372cdf371f252811540208e632bc658c1f78d1b..a7e05714a96cb599ea53869b4c70bc7e79b007f1 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=path
 GOFILES=\
index bf3bd87d6769df2db372ec56f673022a3ec1bdaf..ec3b34180e6c9b75d44c148bd12923d6b1830d56 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=rand
 GOFILES=\
index b72d3873f5b061340ce81a3909e5b62bba2a7cc6..b946449a3a4f620c356c3ded4711f37b9d99b719 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=reflect
 GOFILES=\
index 9f91c8e7aa2fe1bd0cfb29c875c971abf6b40479..9024e66dacb6ccf0209d546ecf31616a14dd587c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=regexp
 GOFILES=\
index 4757b3aae02a2fd9f7eb8d9cc5db59097154fc00..191b10d054dd4d8f949d9d0b8e1d770db2172668 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=rpc
 GOFILES=\
index 1a4fd2e92ceff5eea8d23e068858b0a4f593ad1b..b9a1ac2f77751b9b067f152290ea0175e23afac0 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=rpc/jsonrpc
 GOFILES=\
index a8e7bc7509134a63a2a76f013c3ecf69f8bdc300..cd08cfe98aa5579138072ff419a08922ba90eb6f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=runtime
 
index daffde79d1cf16de14199aff21d1cecf1ab835da..8bccc0cc098fe78d832abb24f814b779e37c9e1c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=runtime/pprof
 GOFILES=\
index 8ac16d68113458680aa53c4daee1f981396a51bc..db4752513a516174bcdb615e31e352a2b9c9cf4b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=scanner
 GOFILES=\
index 57c9f8f47c0182cce8545f9f82e2f6f665753cea..3ea4672409c8d068092d3a0ed8bfb4067f5741db 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=sort
 GOFILES=\
index 57849a82175b73dc2890bf354bb9551783f86613..823355d858d6174b500b73f031735b57d53572bd 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=strconv
 GOFILES=\
index 9bae470e97c1d1567749a776edf5d4da6b9ee3de..c1be58243268c436fa95ad230f092fdb7246ba28 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=strings
 GOFILES=\
index dc3a4b442d923e59267268bad0d548a62a7ae5b1..f843795b0f8ac1194819f4aaebff97d9a2255a37 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=sync
 GOFILES=\
index 363eb601e3d9fbd2f7969b9a686bdb9b2fd9e15b..bf9ed1309e3b17082fc37de60faf2241c1fb2084 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=syscall
 GOFILES=\
index f05d4aef468e9c39b3c511c3106cf143480c302f..cf6863c87b2614e4718c116d179dad1db34d863c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=syslog
 GOFILES=\
index 5beb88f0f65d511d098ae561743e27e65fd9d3ea..bdc888784b3674d9d264ca841b86b06a763fd40c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=tabwriter
 GOFILES=\
index c9c79f799a251324d570c0938ba509b2d7677ccb..4915527b44c51ff5f23916fabbf2008a77c13b0e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=template
 GOFILES=\
index 64485489eb1776343ff2dbdbc86376760c3c1b1c..19b791ae9e2f07e35970541adf4eebfbc3eed820 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=testing
 GOFILES=\
index 2b9abd4b37585cc40fe5dddf0864570a2facd8c9..43a047cc971081d0cbf0d8f15ecd49650a6b7f49 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=testing/iotest
 GOFILES=\
index 0e97f2af2204a18ed7eeb85c745f2660296afc6f..6d3b736b010ff6fc27eb1d40cad778ce8147dcaf 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=testing/quick
 GOFILES=\
index 2e13aeb2fb924e2123e8de09f0164ec7fc45612e..9388d972bc7fcb2a05e48253364d8b31ab3e1f5a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
 
 TARG=testing/script
 GOFILES=\
index 6732d6a79fd97e5877600c83e9730440f32f19c1..71318d738ff1e368f1230635732031d35a23578d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=time
 GOFILES=\
index 0728ec881318c0384a40d2e427962c758fdeadab..df0b4a642df2e426864cc1db7f94e63a1da8d593 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=unicode
 GOFILES=\
index 29e40050321fec1d728d4b44594b8a388ea22c75..8a564fb0fd46f9a5d011d1b6c51bb2051119203f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=utf16
 GOFILES=\
index a013913c352a0397dab001f02b033415f5fb71c3..df69486dc3f42c744b7f9f43da32d5bd04a9fb77 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=utf8
 GOFILES=\
index 145d8f4291de0ab4bf96c2c5638f5372937eb45d..6d3c9cbd19825a7cc657b75e05418ed9f5878296 100644 (file)
@@ -1,4 +1,4 @@
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=websocket
 GOFILES=\
index 38e32e7a4f1f2e142e070fed7d5ddc8295d2f167..b780face6328c0c1cbe486f84b6bea88a1f6e6c1 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.$(GOARCH)
+include ../../Make.inc
 
 TARG=xml
 
index d87fb231dd073fa165de6260645bb3e455042a17..147e58f1526e4a452975757d26f18ce2a070bbf3 100755 (executable)
@@ -3,6 +3,9 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+set -e
+. ./env.bash
+
 case "`uname`" in
 Darwin)
        ;;
index 5cd82dfd964eb9771b76687b0b78cabea202a2eb..3e54de2d73385fdc612b466fb0de09857369f019 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 
 GOBIN="${GOBIN:-$HOME/bin}"
 
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake --no-print-directory -f ../../src/Make.inc go-env)
 PATH=.:$PATH
 
 mode=run
index 1a5062b448158aca68e94f56418dc76e92c96b33..ab29e0956c01dbf26422d468ce0df7ca05b8b70e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../src/Make.$(GOARCH)
+include ../../src/Make.inc
 
 ALL=\
        parser\
index 75bcf9aefdab256f2296fadc35fafd3d7aa8ec13..6619f6f882ae6970d9abc46cc79518b81bd7b78e 100644 (file)
@@ -74,7 +74,7 @@ func main() {
        flag.Parse()
 
        var t0 int64
-       pkgroot := os.Getenv("GOROOT") + "/src/pkg/"
+       pkgroot := runtime.GOROOT() + "/src/pkg/"
        for pass := 0; pass < 2; pass++ {
                // Once the heap is grown to full size, reset counters.
                // This hides the start-up pauses, which are much smaller
index d2c6b4dc9a086858bf3b5977e65a864f3702581a..2ce31d5a0a7c3941ac312f2e696444f3a89b88ea 100755 (executable)
--- a/test/run
+++ b/test/run
@@ -3,7 +3,9 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-export E=""
+GOBIN="${GOBIN:-$HOME/bin}"
+eval $("$GOBIN"/gomake --no-print-directory -f ../src/Make.inc go-env)
+
 case X"$GOARCH" in
 Xamd64)
        export A=6