Document two new option helpers:
- OPT_TYPE_DEPENDS_OFF to add a TYPE_DEPENDS when OPT is off - OPT_FLAG_OFF=VAL to add the VAL to FLAG when OPT is off Submitted by: mat Reviewed by: mat
This commit is contained in:
parent
b3d26bf15c
commit
3b91d7f7f6
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43682
1 changed files with 36 additions and 0 deletions
|
@ -4856,6 +4856,24 @@ OPT1_CFLAGS= -DTEST</programlisting>
|
|||
.if ${PORT_OPTIONS:MOPT1}
|
||||
USES+= gmake
|
||||
CFLAGS+= -DTEST
|
||||
.endif</programlisting>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then a
|
||||
flag <literal>ABOVEVARIABLE</literal> will be automatically
|
||||
set when option <literal>X</literal> is not selected. For
|
||||
example:</para>
|
||||
|
||||
<programlisting>OPTIONS_DEFINE= OPT1
|
||||
OPT1_USES_OFF=gmake</programlisting>
|
||||
|
||||
<para>is equivalent to:</para>
|
||||
|
||||
<programlisting>OPTIONS_DEFINE= OPT1
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ! ${PORT_OPTIONS:MOPT1}
|
||||
USES+= gmake
|
||||
.endif</programlisting>
|
||||
|
||||
<para>For any of the following dependency type:</para>
|
||||
|
@ -4906,6 +4924,24 @@ OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a</programlisting>
|
|||
|
||||
.if ${PORT_OPTIONS:MOPT1}
|
||||
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
|
||||
.endif</programlisting>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then a
|
||||
dependency of type <literal>ABOVEVARIABLE</literal> will be
|
||||
added when option <literal>X</literal> is not selected. For
|
||||
example:</para>
|
||||
|
||||
<programlisting>OPTIONS_DEFINE= OPT1
|
||||
OPT1_LIB_DEPENDS_OFF= liba.so:${PORTSDIR}/devel/a</programlisting>
|
||||
|
||||
<para>is equivalent to:</para>
|
||||
|
||||
<programlisting>OPTIONS_DEFINE= OPT1
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
. if ! ${PORT_OPTIONS:MOPT1}
|
||||
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
|
||||
.endif</programlisting>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
|
Loading…
Reference in a new issue