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
# 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=\
</p>
<pre>
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
TARG=container/vector
GOFILES=\
</p>
<pre>
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
TARG=mypackage
GOFILES=\
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.
</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>
</p>
<pre>
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
TARG=numbers
GOFILES=\
</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
# 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
<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>
</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),
<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.
</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.
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>
</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>
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
# 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
# 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
# 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=\
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'"
--- /dev/null
+# 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:=
# 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
+
# 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=\
# 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=\
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
# 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=\
# 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=\
# 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
# 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=\
"io"
"os"
"path"
+ "runtime"
"strings"
)
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)
}
var makefileTemplate = template.MustParse(`
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc
TARG={pkg}
GOFILES=\
--- /dev/null
+// 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
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)
+
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
# 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=\
# 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=\
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
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
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
"$(GOROOT)"/include/u.h\
"$(GOROOT)"/include/libc.h\
-BAKED_GOROOT?=$(GOROOT)
+GOROOT_FINAL?=$(GOROOT)
install: $(LIB)
cp $(LIB) "$(GOROOT)/lib"
$(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)
# 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
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
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
+
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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
# 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=\
# 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=\
# 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=\
-include ../../../Make.$(GOARCH)
+include ../../../Make.inc
TARG=net/dict
GOFILES=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
# 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=\
-include ../../Make.$(GOARCH)
+include ../../Make.inc
TARG=websocket
GOFILES=\
# 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
# 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)
;;
GOBIN="${GOBIN:-$HOME/bin}"
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake --no-print-directory -f ../../src/Make.inc go-env)
PATH=.:$PATH
mode=run
# 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\
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
# 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