Page MenuHomeFreeBSD

D3516.id8290.diff
No OneTemporary

D3516.id8290.diff

Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -4496,6 +4496,110 @@
</example>
</sect3>
+ <sect3 xml:id="options-vars">
+ <title><varname><replaceable>OPT</replaceable>_VARS</varname></title>
+
+ <para>Provides a generic way to set and append to variables.
+ Check in this chapter that there is not already an existing
+ helper available before using this.</para>
+
+ <para>When option <replaceable>OPT</replaceable> is selected,
+ and <varname><replaceable>OPT</replaceable>_VARS</varname>
+ is defined, for each
+ <literal><replaceable>key</replaceable>=<replaceable>value</replaceable></literal>
+ pair of
+ <varname><replaceable>OPT</replaceable>_VARS</varname>,
+ <literal><replaceable>KEY</replaceable></literal> is set to
+ <literal><replaceable>value</replaceable></literal>. For
+ each
+ <literal><replaceable>key</replaceable>+=<replaceable>value</replaceable></literal>
+ pair of
+ <varname><replaceable>OPT</replaceable>_VARS</varname>,
+ <literal><replaceable>value</replaceable></literal> is
+ appended to
+ <literal><replaceable>KEY</replaceable></literal>.
+ example:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2 OPT3
+OPT1_VARS= also_build+=opt1
+OPT2_VARS= also_build+=opt2
+OPT3_VARS= opt3_build=yes
+
+MAKE_ARGS= ALSO_BUILD="${ALSO_BUILD}" OPT3_BUILD="${OPT3_BUILD}"</programlisting>
+
+ <para>is equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+
+.include &lt;bsd.port.options.mk&gt;
+
+.if ${PORT_OPTIONS:MOPT1}
+ALSO_BUILD+= opt1
+.endif
+
+.if ${PORT_OPTIONS:MOPT2}
+ALSO_BUILD+= opt2
+.endif
+
+.if ${PORT_OPTIONS:MOPT2}
+OPT3_BUILD= yes
+.endif
+
+MAKE_ARGS= ALSO_BUILD="${ALSO_BUILD}" OPT3_BUILD="${OPT3_BUILD}"</programlisting>
+ </sect3>
+
+ <sect3 xml:id="options-vars-off">
+ <title><varname><replaceable>OPT</replaceable>_VARS_OFF</varname></title>
+
+ <para>Provides a generic way to set and append to variables.
+ Check in this chapter that there is not already an existing
+ helper available before using this.</para>
+
+ <para>When option <replaceable>OPT</replaceable> is not selected,
+ and <varname><replaceable>OPT</replaceable>_VARS_OFF</varname>
+ is defined, for each
+ <literal><replaceable>key</replaceable>=<replaceable>value</replaceable></literal>
+ pair of
+ <varname><replaceable>OPT</replaceable>_VARS_OFF</varname>,
+ <literal><replaceable>KEY</replaceable></literal> is set to
+ <literal><replaceable>value</replaceable></literal>. For
+ each
+ <literal><replaceable>key</replaceable>+=<replaceable>value</replaceable></literal>
+ pair of
+ <varname><replaceable>OPT</replaceable>_VARS_OFF</varname>,
+ <literal><replaceable>value</replaceable></literal> is
+ appended to
+ <literal><replaceable>KEY</replaceable></literal>.
+ example:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2 OPT3
+OPT1_VARS_OFF= no_build_build+=opt1
+OPT2_VARS_OFF= no_build_build+=opt2
+OPT3_VARS_OFF= opt3_build=no
+
+MAKE_ARGS= NO_BUILD_BUILD="${NO_BUILD_BUILD}" OPT3_BUILD="${OPT3_BUILD}"</programlisting>
+
+ <para>is equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+
+.include &lt;bsd.port.options.mk&gt;
+
+.if ! ${PORT_OPTIONS:MOPT1}
+NO_BUILD_BUILD+= opt1
+.endif
+
+.if ! ${PORT_OPTIONS:MOPT2}
+NO_BUILD_BUILD+= opt2
+.endif
+
+.if ! ${PORT_OPTIONS:MOPT2}
+OPT3_BUILD= yes
+.endif
+
+MAKE_ARGS= NO_BUILD_BUILD="${NO_BUILD_BUILD}" OPT3_BUILD="${OPT3_BUILD}"</programlisting>
+ </sect3>
+
<sect3 xml:id="options-dependencies">
<title>Dependencies</title>

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 11, 12:34 AM (8 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26848853
Default Alt Text
D3516.id8290.diff (3 KB)

Event Timeline