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:
Niclas Zeising 2012-10-04 18:39:41 +00:00
parent b496798b51
commit 64219b1d6c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39657

View file

@ -4474,6 +4474,13 @@ RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar
.include &lt;bsd.port.mk&gt;</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 &lt;bsd.port.mk&gt;</programlisting>