aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-09-16 11:32:38 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-09-16 11:32:38 +0000
commit178ffea011735a1662001eafac8628381b3afac0 (patch)
treea89079aa8b68ab47bddd8c6af71dc0312bd3a251
parente399dedefdc4a49176fd279627ec92f1b853b12f (diff)
downloaddoc-178ffea011735a1662001eafac8628381b3afac0.tar.gz
doc-178ffea011735a1662001eafac8628381b3afac0.zip
Porter's Handbook: Document new GO_TARGET syntax
Submitted by: dmgk Approved by: bcr Differential Revision: https://reviews.freebsd.org/D21609
Notes
Notes: svn path=/head/; revision=53409
-rw-r--r--en_US.ISO8859-1/books/porters-handbook/special/chapter.xml18
-rw-r--r--en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml27
2 files changed, 32 insertions, 13 deletions
diff --git a/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
index 7a8f2143c6..e90b28188f 100644
--- a/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ b/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -1313,6 +1313,24 @@ daviddengcn-go-colortext-186a3d44e920_GH0.tar. 4534 B 1098 kBps 00s
like with <application>Poudriere</application>, remember to
run <command>make clean</command> before any testing.</para>
</example>
+
+ <example xml:id="go-ex2">
+ <title>Setting Output Binary Name or Installation Path</title>
+
+ <para>Some ports need to install the resulting binary under a
+ different name or to a path other than
+ the default <literal>${PREFIX}/bin</literal>. This can be
+ done by using <varname>GO_TARGET</varname> tuple syntax,
+ for example:</para>
+ <programlisting>GO_TARGET= ./cmd/ipfs:ipfs-go</programlisting>
+
+ <para>will install <literal>ipfs</literal> binary as
+ <literal>${PREFIX}/bin/ipfs-go</literal> and</para>
+ <programlisting>GO_TARGET= ./dnscrypt-proxy:${PREFIX}/sbin/dnscrypt-proxy</programlisting>
+
+ <para>will install <literal>dnscrypt-proxy</literal> to
+ <literal>${PREFIX}/sbin</literal>.</para>
+ </example>
</sect2>
</sect1>
diff --git a/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
index bab0f1d9ce..1344f38736 100644
--- a/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
+++ b/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
@@ -1168,17 +1168,14 @@ USE_GNOME= gnomemenus3:build intlhack</programlisting>
<term><varname>GO_PKGNAME</varname></term>
<listitem>
- <para>The name of the <application>Go</application> package.
- When building in GOPATH mode, this is the directory that
- will be created in <literal>${GOPATH}/src</literal> and
- seen by the <command>go</command>. When building in
- modules-aware mode, no GOPATH directories will be created
- and <varname>GO_PKGNAME</varname> value will be only used
- as a default for <varname>GO_TARGET</varname>. If not set
- explicitly and <varname>GH_SUBDIR</varname> is present,
- <varname>GO_PKGNAME</varname> value will be inferred from
- <varname>${GH_SUBDIR}</varname>, otherwise it will be set
- to <varname>${PORTNAME}</varname>.</para>
+ <para>The name of the <application>Go</application> package
+ when building in GOPATH mode. This is the directory that
+ will be created in <literal>${GOPATH}/src</literal>. If
+ not set explicitly and <varname>GH_SUBDIR</varname> or
+ <varname>GL_SUBDIR</varname> is present,
+ <varname>GO_PKGNAME</varname> will be inferred from it.
+ It is not needed when building in modules-aware
+ mode.</para>
</listitem>
</varlistentry>
@@ -1186,8 +1183,12 @@ USE_GNOME= gnomemenus3:build intlhack</programlisting>
<term><varname>GO_TARGET</varname></term>
<listitem>
- <para>The name of the packages to build. The default
- value is <varname>${GO_PKGNAME}</varname>.</para>
+ <para>The packages to build. The default
+ value is <varname>${GO_PKGNAME}</varname>.
+ <varname>GO_TARGET</varname> can also be a tuple in the
+ form <literal>package:path</literal> where path can be
+ either a simple filename or a full path starting with
+ <literal>${PREFIX}</literal>.</para>
</listitem>
</varlistentry>