Add a small example on how to check if a ports option is unset.
Reviewed by: bapt Approved by: joel (mentor)
This commit is contained in:
parent
b496798b51
commit
64219b1d6c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39657
1 changed files with 11 additions and 0 deletions
|
@ -4474,6 +4474,13 @@ RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar
|
|||
.include <bsd.port.mk></programlisting>
|
||||
</example>
|
||||
|
||||
<example id ="ports-options-check-unset">
|
||||
<title>Check for Unset Port <makevar>OPTIONS</makevar></title>
|
||||
<programlisting>.if empty(PORT_OPTIONS:MEXAMPLES)
|
||||
CONFIGURE_ARGS+=--without-examples
|
||||
.endif</programlisting>
|
||||
</example>
|
||||
|
||||
<example id="ports-options-practical-use">
|
||||
<title>Practical Use of <makevar>OPTIONS</makevar></title>
|
||||
|
||||
|
@ -4508,6 +4515,10 @@ CONFIGURE_ARGS+= --without-postgres
|
|||
LIB_DEPENDS+= icuuc:${PORTSDIR}/devel/icu
|
||||
.endif
|
||||
|
||||
.if empty(PORT_OPTIONS:MEXAMPLES)
|
||||
CONFIGURE_ARGS+= --without-examples
|
||||
.endif
|
||||
|
||||
# Check other OPTIONS
|
||||
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
|
Loading…
Reference in a new issue