Page MenuHomeFreeBSD

D3409.id8027.diff
No OneTemporary

D3409.id8027.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
@@ -4390,6 +4390,68 @@
.endif</programlisting>
</sect3>
+ <sect3 xml:id="options-implies">
+ <title><varname><replaceable>OPT</replaceable>_IMPLIES</varname></title>
+
+ <para>Provides a way to add dependencies between options.</para>
+
+ <para>When <replaceable>OPT</replaceable> is enabled, all the
+ options listed in this variable will be enabled too. Using
+ the <link
+ linkend="options-configure_enable"><varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname></link>
+ described earlier to illustrate:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+OPT1_IMPLIES= OPT2
+
+OPT1_CONFIGURE_ENABLE= opt1
+OPT2_CONFIGURE_ENABLE= opt2</programlisting>
+
+ <para>Is equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+
+.include &lt;bsd.port.options.mk&gt;
+
+.if ${PORT_OPTIONS:MOPT1}
+CONFIGURE_ARGS+= --enable-opt1
+.else
+CONFIGURE_ARGS+= --disable-opt1
+.endif
+
+.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1}
+CONFIGURE_ARGS+= --enable-opt2
+.else
+CONFIGURE_ARGS+= --disable-opt2
+.endif</programlisting>
+ </sect3>
+
+ <sect3 xml:id="options-prevents">
+ <title><varname><replaceable>OPT</replaceable>_PREVENTS</varname></title>
+
+ <para>Provides a way to add conflicts between options.</para>
+
+ <para>When <replaceable>OPT</replaceable> is enabled, all the
+ options listed in this variable must be disabled. For example:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+OPT1_PREVENTS= OPT2</programlisting>
+
+ <para>Is roughly equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1 OPT2
+
+.include &lt;bsd.port.options.mk&gt;
+
+.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1}
+BROKEN= Option OPT1 conflicts with OPT2 (select only one)
+.endif</programlisting>
+
+ <para>The only difference is that the first one will write an
+ error after running <command>make config</command>,
+ suggesting changing the selected options.</para>
+ </sect3>
+
<sect3 xml:id="options-dependencies">
<title>Dependencies</title>

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 5:49 AM (10 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28545090
Default Alt Text
D3409.id8027.diff (2 KB)

Event Timeline