aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-09-10 13:16:27 +0000
committerMathieu Arnold <mat@FreeBSD.org>2018-09-10 13:16:27 +0000
commit2f70fd9e5429b2eba91721c744b791016ef37631 (patch)
treef612b96581ff648a7edcfd91cabb90ccb204d37f /Mk/bsd.options.mk
parent0ac9de909b7ab73d004a6de6ac750cf9377fa8e3 (diff)
downloadports-2f70fd9e5429b2eba91721c744b791016ef37631.tar.gz
ports-2f70fd9e5429b2eba91721c744b791016ef37631.zip
Only set %%PORTDOCS%%/%%PORTEXAMPLES%% if a DOCS/EXAMPLES option is defined.
PR: 230864 Submitted by: mat exp-runs by: antoine Differential Revision: https://reviews.freebsd.org/D13651
Notes
Notes: svn path=/head/; revision=479410
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r--Mk/bsd.options.mk27
1 files changed, 14 insertions, 13 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index a6de56f09e91..69852cf29303 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -410,18 +410,19 @@ PORT_OPTIONS+= ${OPTIONS_SLAVE}
# Sort options and eliminate duplicates
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
-## Now some compatibility
-.if empty(PORT_OPTIONS:MDOCS)
-PLIST_SUB+= PORTDOCS="@comment "
-.else
-PLIST_SUB+= PORTDOCS=""
-.endif
-
-.if empty(PORT_OPTIONS:MEXAMPLES)
-PLIST_SUB+= PORTEXAMPLES="@comment "
-.else
-PLIST_SUB+= PORTEXAMPLES=""
-.endif
+_REALLY_ALL_POSSIBLE_OPTIONS:= ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE}
+_REALLY_ALL_POSSIBLE_OPTIONS:= ${_REALLY_ALL_POSSIBLE_OPTIONS:O:u}
+
+# Handle PORTDOCS and PORTEXAMPLES
+.for _type in DOCS EXAMPLES
+. if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type})
+. if empty(PORT_OPTIONS:M${_type})
+PLIST_SUB+= PORT${_type}="@comment "
+. else
+PLIST_SUB+= PORT${_type}=""
+. endif
+. endif
+.endfor
.if defined(NO_OPTIONS_SORT)
ALL_OPTIONS= ${OPTIONS_DEFINE}
@@ -431,7 +432,7 @@ ALL_OPTIONS= ${OPTIONS_DEFINE}
_OPTIONS_${target}?=
.endfor
-.for opt in ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE:O:u}
+.for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS}
# PLIST_SUB
PLIST_SUB?=
SUB_LIST?=