Add an example to the Options and Helpers section.
Sponsored by: Absolight, The FreeBSD Foundation
This commit is contained in:
parent
f20e82aec4
commit
22ec61ce1f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50621
1 changed files with 38 additions and 1 deletions
|
@ -407,7 +407,7 @@
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="porting-order-options">
|
<sect1 xml:id="porting-order-options">
|
||||||
<title>Options</title>
|
<title>Options and Helpers</title>
|
||||||
|
|
||||||
<para>If the port uses the <link
|
<para>If the port uses the <link
|
||||||
linkend="makefile-options">options framework</link>, define
|
linkend="makefile-options">options framework</link>, define
|
||||||
|
@ -418,6 +418,43 @@
|
||||||
<varname><replaceable>*</replaceable>_DESC</varname>
|
<varname><replaceable>*</replaceable>_DESC</varname>
|
||||||
descriptions, then the options helpers. Try and sort all of
|
descriptions, then the options helpers. Try and sort all of
|
||||||
those alphabetically.</para>
|
those alphabetically.</para>
|
||||||
|
|
||||||
|
<example xml:id="porting-order-options-ex1">
|
||||||
|
<title>Options Variables Order Example</title>
|
||||||
|
|
||||||
|
<para>The <literal>FOO</literal> and <literal>BAR</literal>
|
||||||
|
options do not have a standard description, so one need to
|
||||||
|
be written. The other options already have one in
|
||||||
|
<filename>Mk/bsd.options.desc.mk</filename> so writing one
|
||||||
|
is not needed. The <literal>DOCS</literal> and
|
||||||
|
<literal>EXAMPLES</literal> use target helpers to install
|
||||||
|
their files, they are shown here for completeness, though
|
||||||
|
they belong in <xref linkend="porting-order-targets"/>, so
|
||||||
|
other variables and targets could be inserted before
|
||||||
|
them.</para>
|
||||||
|
|
||||||
|
<programlisting>OPTIONS_DEFINE= DOCS EXAMPLES FOO BAR
|
||||||
|
OPTIONS_DEFAULT= FOO
|
||||||
|
OPTIONS_RADIO= SSL
|
||||||
|
OPTIONS_RADIO_SSL= OPENSSL GNUTLS
|
||||||
|
OPTIONS_SUB= yes
|
||||||
|
|
||||||
|
BAR_DESC= Enable bar support
|
||||||
|
FOO_DESC= Enable foo support
|
||||||
|
|
||||||
|
BAR_CONFIGURE_WITH= bar=${LOCALBASE}
|
||||||
|
FOO_CONFIGURE_ENABLE= foo
|
||||||
|
GNUTLS_CONFIGURE_ON= --with-ssl=gnutls
|
||||||
|
OPENSSL_CONFIGURE_ON= --with-ssl=openssl
|
||||||
|
|
||||||
|
post-install-DOCS-on:
|
||||||
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
|
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
||||||
|
|
||||||
|
post-install-EXAMPLES-on:
|
||||||
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||||
|
cd ${WRKSRC}/ex && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}</programlisting>
|
||||||
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="porting-order-rest">
|
<sect1 xml:id="porting-order-rest">
|
||||||
|
|
Loading…
Reference in a new issue