|
Lines 4015-4020
Link Here
|
| 4015 |
must be added to <varname>OPTIONS_DEFINE</varname>.</para> |
4015 |
must be added to <varname>OPTIONS_DEFINE</varname>.</para> |
| 4016 |
</note> |
4016 |
</note> |
| 4017 |
</sect3> |
4017 |
</sect3> |
|
|
4018 |
|
| 4019 |
<sect3 xml:id="makefile-options-implies-prevents"> |
| 4020 |
<title>Options Dependencies/Conflicts</title> |
| 4021 |
|
| 4022 |
<para>Where options have dependencies or conflicts between |
| 4023 |
each other, these should be registered using the |
| 4024 |
<varname><replaceable>OPT</replaceable>_IMPLIES</varname> |
| 4025 |
and <varname><replaceable>OPT</replaceable>_PREVENTS</varname> |
| 4026 |
macros.</para> |
| 4027 |
|
| 4028 |
<sect4> |
| 4029 |
<title><varname><replaceable>OPT</replaceable>_IMPLIES</varname></title> |
| 4030 |
|
| 4031 |
<para>If an option depends on other options, these should be |
| 4032 |
registered by a space separated list using the |
| 4033 |
<replaceable>OPT</replaceable>_IMPLIES macro. If the |
| 4034 |
option with dependencies is enabled, the dependent options |
| 4035 |
named in <replaceable>OPT</replaceable>_IMPLIES will get |
| 4036 |
enabled automatically.</para> |
| 4037 |
|
| 4038 |
<para>For example, if <replaceable>OPT1</replaceable> |
| 4039 |
depends on <replaceable>OPT2</replaceable> and |
| 4040 |
<replaceable>OPT3</replaceable>:</para> |
| 4041 |
|
| 4042 |
<programlisting>OPT1_IMPLIES= OPT2 OPT3</programlisting> |
| 4043 |
|
| 4044 |
<note> |
| 4045 |
<para>No notification or warning is provided in the build |
| 4046 |
output or the options configuration dialog to alert the |
| 4047 |
user that an option has been automatically |
| 4048 |
enabled.</para> |
| 4049 |
</note> |
| 4050 |
</sect4> |
| 4051 |
|
| 4052 |
<sect4> |
| 4053 |
<title><varname><replaceable>OPT</replaceable>_PREVENTS</varname></title> |
| 4054 |
|
| 4055 |
<para>If options conflict with each other, these should be |
| 4056 |
registered by a space separated list using the |
| 4057 |
<replaceable>OPT</replaceable>_PREVENTS macro. When an |
| 4058 |
option is enabled, if any of the conflicting options named |
| 4059 |
in <replaceable>OPT</replaceable>_PREVENTS are also |
| 4060 |
enabled, the port build will produce an error which |
| 4061 |
explains the conflicting options.</para> |
| 4062 |
|
| 4063 |
<para>For example, if <replaceable>OPT1</replaceable> |
| 4064 |
conflicts with <replaceable>OPT2</replaceable> and |
| 4065 |
<replaceable>OPT3</replaceable>:</para> |
| 4066 |
|
| 4067 |
<programlisting>OPT1_PREVENTS= OPT2 OPT3</programlisting> |
| 4068 |
|
| 4069 |
<note> |
| 4070 |
<para>No notification is provided in the options |
| 4071 |
configuration dialog to alert the user that conflicting |
| 4072 |
options have been enabled, however an error will be |
| 4073 |
generated during the port build explaining the |
| 4074 |
conflict.</para> |
| 4075 |
</note> |
| 4076 |
|
| 4077 |
<para>If options are conflicting because a maximum of one |
| 4078 |
option should be enabled in a list, then the |
| 4079 |
<literal>OPTIONS_SINGLE</literal> or |
| 4080 |
<literal>OPTIONS_RADIO</literal> macros should be used |
| 4081 |
in preference to the <replaceable>OPT</replaceable>_PREVENTS |
| 4082 |
macro. The <replaceable>OPT</replaceable>_PREVENTS macro |
| 4083 |
should be used for more complicated conflict scenarios, |
| 4084 |
for example:</para> |
| 4085 |
|
| 4086 |
<programlisting>OPTIONS_DEFINE= PORTS_SSL |
| 4087 |
OPTIONS_SINGLE= GSSAPI |
| 4088 |
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE |
| 4089 |
|
| 4090 |
# Ensure port does not link with libcrypto.so from both base and ports |
| 4091 |
GSSAPI_BASE_PREVENTS= PORTS_SSL</programlisting> |
| 4092 |
|
| 4093 |
</sect4> |
| 4094 |
|
| 4095 |
</sect3> |
| 4018 |
</sect2> |
4096 |
</sect2> |
| 4019 |
|
4097 |
|
| 4020 |
<sect2 xml:id="makefile-options-auto-activation"> |
4098 |
<sect2 xml:id="makefile-options-auto-activation"> |