Changeset View
Changeset View
Standalone View
Standalone View
head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
Show First 20 Lines • Show All 1,140 Lines • ▼ Show 20 Lines | <xref linkend="go-libs"/> for more information.</para> | ||||
<para>Sets default values and targets used to build | <para>Sets default values and targets used to build | ||||
<application>Go</application> software. A build dependency | <application>Go</application> software. A build dependency | ||||
on the Go compiler port selected via <varname>GO_PORT</varname> | on the Go compiler port selected via <varname>GO_PORT</varname> | ||||
is added. By default the build is performed in GOPATH mode. | is added. By default the build is performed in GOPATH mode. | ||||
If Go software uses modules, the modules-aware mode can be | If Go software uses modules, the modules-aware mode can be | ||||
switched on with <literal>modules</literal> argument. | switched on with <literal>modules</literal> argument. | ||||
<literal>no_targets</literal> will setup build environment like | <literal>no_targets</literal> will setup build environment like | ||||
<varname>GO_ENV</varname>, <varname>GO_BUILDFLAGS</varname> but | <varname>GO_ENV</varname>, <varname>GO_BUILDFLAGS</varname> but | ||||
skip creating <buildtarget>post-extract</buildtarget>, | skip creating <buildtarget>post-extract</buildtarget> and | ||||
<buildtarget>do-build</buildtarget> and | <buildtarget>do-{build,install,test}</buildtarget> targets. | ||||
<buildtarget>do-install</buildtarget> targets. | |||||
<literal>run</literal> will also add a run dependency on | <literal>run</literal> will also add a run dependency on | ||||
what is in <varname>GO_PORT</varname>.</para> | what is in <varname>GO_PORT</varname>.</para> | ||||
<para>The build process is controlled by several variables:</para> | <para>The build process is controlled by several variables:</para> | ||||
<variablelist> | <variablelist> | ||||
<varlistentry> | <varlistentry> | ||||
<term><varname>GO_PKGNAME</varname></term> | <term><varname>GO_PKGNAME</varname></term> | ||||
Show All 19 Lines | <para>The packages to build. The default | ||||
<varname>GO_TARGET</varname> can also be a tuple in the | <varname>GO_TARGET</varname> can also be a tuple in the | ||||
form <literal>package:path</literal> where path can be | form <literal>package:path</literal> where path can be | ||||
either a simple filename or a full path starting with | either a simple filename or a full path starting with | ||||
<literal>${PREFIX}</literal>.</para> | <literal>${PREFIX}</literal>.</para> | ||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term><varname>GO_TESTTARGET</varname></term> | |||||
<listitem> | |||||
<para>The packages to test. The default | |||||
value is <literal>./...</literal> (the current package | |||||
and all subpackages).</para> | |||||
</listitem> | |||||
</varlistentry> | |||||
<varlistentry> | |||||
<term><varname>CGO_CFLAGS</varname></term> | <term><varname>CGO_CFLAGS</varname></term> | ||||
<listitem> | <listitem> | ||||
<para>Additional <varname>CFLAGS</varname> values to be | <para>Additional <varname>CFLAGS</varname> values to be | ||||
passed to the <application>C</application> compiler by | passed to the <application>C</application> compiler by | ||||
<command>go</command>.</para> | <command>go</command>.</para> | ||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term><varname>CGO_LDFLAGS</varname></term> | <term><varname>CGO_LDFLAGS</varname></term> | ||||
<listitem> | <listitem> | ||||
<para>Additional <varname>LDFLAGS</varname> values to be | <para>Additional <varname>LDFLAGS</varname> values to be | ||||
passed to the <application>C</application> compiler by | passed to the <application>C</application> compiler by | ||||
<command>go</command>.</para> | <command>go</command>.</para> | ||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term><varname>GO_BUILDFLAGS</varname></term> | <term><varname>GO_BUILDFLAGS</varname></term> | ||||
<listitem> | <listitem> | ||||
<para>Additional build arguments to be passed to | <para>Additional build arguments to be passed to | ||||
<command>go install</command>.</para> | <command>go build</command>.</para> | ||||
</listitem> | |||||
</varlistentry> | |||||
<varlistentry> | |||||
<term><varname>GO_TESTFLAGS</varname></term> | |||||
<listitem> | |||||
<para>Additional build arguments to be passed to | |||||
<command>go test</command>.</para> | |||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term><varname>GO_PORT</varname></term> | <term><varname>GO_PORT</varname></term> | ||||
<listitem> | <listitem> | ||||
<para>The Go compiler port to use. By default this is | <para>The Go compiler port to use. By default this is | ||||
▲ Show 20 Lines • Show All 2,517 Lines • Show Last 20 Lines |