Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144398559
D3409.id8027.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D3409.id8027.diff
View Options
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 <bsd.port.options.mk>
+
+.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 <bsd.port.options.mk>
+
+.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
Details
Attached
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)
Attached To
Mode
D3409: Document the opt_IMPLIES/opt_PREVENTS helpers.
Attached
Detach File
Event Timeline
Log In to Comment