1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:34:42 -07:00

doc/install-source.html: update for go tool

Make some updates, get rid of mentions of make.
There remain a number of open questions.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5720057
This commit is contained in:
Rob Pike 2012-03-03 09:36:09 +11:00
parent 485bf1ed15
commit 95d7d3d658

View File

@ -5,21 +5,31 @@
<h2 id="introduction">Introduction</h2> <h2 id="introduction">Introduction</h2>
<p>Go is an open source project, distributed under a <p>
Go is an open source project, distributed under a
<a href="/LICENSE">BSD-style license</a>. <a href="/LICENSE">BSD-style license</a>.
This document explains how to check out the sources, This document explains how to check out the sources,
build them on your own machine, and run them. build them on your own machine, and run them.
</p> </p>
<p>
Most users don't need to do this, and will instead install
from precompiled binary packages as described in
<a href="/doc/install.html">Getting Started</a>,
a much simpler process.
If you want to help develop what goes into those precompiled
packages, though, read on.
</p>
<div class="detail"> <div class="detail">
<p> <p>
There are two official Go compiler tool chains. There are two official Go compiler tool chains.
This document focuses on the <code>gc</code> Go This document focuses on the <code>gc</code> Go
compiler and tools (<code>6g</code>, <code>8g</code> etc.). compiler and tools (<code>6g</code>, <code>8g</code> etc.).
For information on how to use <code>gccgo</code>, a more traditional For information on how to work on <code>gccgo</code>, a more traditional
compiler using the GCC back end, see compiler using the GCC back end, see
<a href="/install/gccgo/">Setting up and using gccgo</a>. <a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
</p> </p>
<p> <p>
@ -33,7 +43,7 @@ architectures.
<code>amd64</code> (a.k.a. <code>x86-64</code>); <code>6g,6l,6c,6a</code> <code>amd64</code> (a.k.a. <code>x86-64</code>); <code>6g,6l,6c,6a</code>
</dt> </dt>
<dd> <dd>
The most mature implementation. The compiler has an effective A mature implementation. The compiler has an effective
optimizer (registerizer) and generates good code (although optimizer (registerizer) and generates good code (although
<code>gccgo</code> can do noticeably better sometimes). <code>gccgo</code> can do noticeably better sometimes).
</dd> </dd>
@ -47,7 +57,8 @@ architectures.
<code>arm</code> (a.k.a. <code>ARM</code>); <code>5g,5l,5c,5a</code> <code>arm</code> (a.k.a. <code>ARM</code>); <code>5g,5l,5c,5a</code>
</dt> </dt>
<dd> <dd>
Supports only Linux binaries. Less tested than the other ports. Supports only Linux binaries. Less widely used than the other ports and therefore
not as thoroughly tested.
</dd> </dd>
</dl> </dl>
@ -113,7 +124,7 @@ You might try this first:
<p> <p>
If that fails, try installing manually from the If that fails, try installing manually from the
<a href="http://mercurial.selenic.com/wiki/Download">Mercurial Download</a> <a href="http://mercurial.selenic.com/wiki/Download">Mercurial Download</a>
page.</p> page.
</p> </p>
<p> <p>
@ -136,7 +147,6 @@ if necessary.
<h2 id="fetch">Fetch the repository</h2> <h2 id="fetch">Fetch the repository</h2>
<p>
<p>Go will install to a directory named <code>go</code>. <p>Go will install to a directory named <code>go</code>.
Change to the directory that will be its parent Change to the directory that will be its parent
and make sure the <code>go</code> directory does not exist. and make sure the <code>go</code> directory does not exist.
@ -222,58 +232,31 @@ If you see the "hello, world" message then Go is installed correctly.
</p> </p>
<h2 id="next">What's next</h2>
<p>
Start by taking <a href="http://tour.golang.org/">A Tour of Go</a>.
</p>
<p>
For more detail about the process of building and testing Go programs
read <a href="/doc/code.html">How to Write Go Code</a>.
</p>
<p>
Build a web application by following the <a href="/doc/articles/wiki/">Wiki
Tutorial</a>.
</p>
<p>
Read <a href="/doc/effective_go.html">Effective Go</a> to learn about writing
idiomatic Go code.
</p>
<p>
For the full story, consult Go's extensive
<a href="/doc/">documentation</a>.
</p>
<h2 id="community">Community resources</h2> <h2 id="community">Community resources</h2>
<p> <p>
For real-time help, there may be users or developers on The usual community resources such as
<code>#go-nuts</code> on the <a href="http://freenode.net/">Freenode</a> IRC server. <code>#go-nuts</code> on the <a href="http://freenode.net/">Freenode</a> IRC server
</p> and the
<a href="http://groups.google.com/group/golang-nuts">Go Nuts</a>
<p> mailing list have active developers that can help you with problems
The official mailing list for discussion of the Go language is with your installation or your development work.
<a href="http://groups.google.com/group/golang-nuts">Go Nuts</a>. For those who wish to keep up to date,
there is another mailing list, <a href="http://groups.google.com/group/golang-checkins">golang-checkins</a>,
that receives a message summarizing each checkin to the Go repository.
</p> </p>
<p> <p>
Bugs can be reported using the <a href="http://code.google.com/p/go/issues/list">Go issue tracker</a>. Bugs can be reported using the <a href="http://code.google.com/p/go/issues/list">Go issue tracker</a>.
</p> </p>
<p>
For those who wish to keep up with development,
there is another mailing list, <a href="http://groups.google.com/group/golang-checkins">golang-checkins</a>,
that receives a message summarizing each checkin to the Go repository.
</p>
<h2 id="releases">Keeping up with releases</h2> <h2 id="releases">Keeping up with releases</h2>
<p>
XXX TODO XXX
</p>
<p> <p>
The Go project maintains two stable tags in its Mercurial repository: The Go project maintains two stable tags in its Mercurial repository:
<code>release</code> and <code>weekly</code>. <code>release</code> and <code>weekly</code>.
@ -311,7 +294,7 @@ To use the <code>weekly</code> tag run <code>hg update weekly</code> instead.
<p> <p>
The Go compilation environment can be customized by environment variables. The Go compilation environment can be customized by environment variables.
<i>None are required by the build</i>, but you may wish to set them <i>None is required by the build</i>, but you may wish to set some
to override the defaults. to override the defaults.
</p> </p>
@ -321,11 +304,14 @@ to override the defaults.
</dt> </dt>
<dd> <dd>
<p> <p>
XXX FONT IS WRONG IN THESE ENTRIES XXX
XXX I NEED SOME SPAN THING XXX
The root of the Go tree, often <code>$HOME/go</code>. 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. Its value is built into the tree when it is compiled, and
If you choose not to set <code>$GOROOT</code>, you must defaults to the parent of the directory where <code>all.bash</code> was run.
run <code>gomake</code> instead of <code>make</code> or <code>gmake</code> There is no need to set this unless you want to switch between multiple
when developing Go programs using the conventional makefiles. local copies of the repository.
</p>
</dd> </dd>
<dt> <dt>
@ -334,11 +320,12 @@ to override the defaults.
<dd> <dd>
<p> <p>
The value assumed by installed binaries and scripts when The value assumed by installed binaries and scripts when
<code>$GOROOT</code> is not set. <code>$GOROOT</code> is not set explicitly.
It defaults to the value used for <code>$GOROOT</code>. It defaults to the value of <code>$GOROOT</code>.
If you want to build the Go tree in one location If you want to build the Go tree in one location
but move it elsewhere after the build, set but move it elsewhere after the build, set
<code>$GOROOT_FINAL</code> to the eventual location. <code>$GOROOT_FINAL</code> to the eventual location.
</p>
</dd> </dd>
<dt> <dt>
@ -406,7 +393,6 @@ to override the defaults.
<td></td><td><code>windows</code></td> <td><code>amd64</code></td> <td></td><td><code>windows</code></td> <td><code>amd64</code></td>
</tr> </tr>
</table> </table>
<p>
</dd> </dd>
<dt> <dt>
@ -431,7 +417,8 @@ to override the defaults.
</dt> </dt>
<dd> <dd>
<p> <p>
The location where binaries will be installed. The location where binaries from the main repository will be installed.
XXX THIS MAY CHANGE TO BE AN OVERRIDE EVEN FOR GOPATH ENTRIES XXX
The default is <code>$GOROOT/bin</code>. The default is <code>$GOROOT/bin</code>.
After installing, you will want to arrange to add this After installing, you will want to arrange to add this
directory to your <code>$PATH</code>, so you can use the tools. directory to your <code>$PATH</code>, so you can use the tools.
@ -472,3 +459,8 @@ export GOROOT=$HOME/go
export GOARCH=amd64 export GOARCH=amd64
export GOOS=linux export GOOS=linux
</pre> </pre>
<p>
although, to reiterate, none of these variables needs to be set to build,
install, and develop the Go tree.
</p>