Date: Wed, 2 Aug 2017 12:19:47 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r50621 - head/en_US.ISO8859-1/books/porters-handbook/order Message-ID: <201708021219.v72CJllT010263@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Wed Aug 2 12:19:47 2017 New Revision: 50621 URL: https://svnweb.freebsd.org/changeset/doc/50621 Log: Add an example to the Options and Helpers section. Sponsored by: Absolight, The FreeBSD Foundation Modified: head/en_US.ISO8859-1/books/porters-handbook/order/chapter.xml (contents, props changed) Modified: head/en_US.ISO8859-1/books/porters-handbook/order/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/order/chapter.xml Wed Aug 2 12:19:45 2017 (r50620) +++ head/en_US.ISO8859-1/books/porters-handbook/order/chapter.xml Wed Aug 2 12:19:47 2017 (r50621) @@ -407,7 +407,7 @@ </sect1> <sect1 xml:id="porting-order-options"> - <title>Options</title> + <title>Options and Helpers</title> <para>If the port uses the <link linkend="makefile-options">options framework</link>, define @@ -418,6 +418,43 @@ <varname><replaceable>*</replaceable>_DESC</varname> descriptions, then the options helpers. Try and sort all of 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 xml:id="porting-order-rest">
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708021219.v72CJllT010263>