svn commit: r479410 - head/Mk
Mathieu Arnold
mat at FreeBSD.org
Mon Sep 10 13:16:29 UTC 2018
Author: mat
Date: Mon Sep 10 13:16:27 2018
New Revision: 479410
URL: https://svnweb.freebsd.org/changeset/ports/479410
Log:
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
Modified:
head/Mk/bsd.options.mk (contents, props changed)
Modified: head/Mk/bsd.options.mk
==============================================================================
--- head/Mk/bsd.options.mk Mon Sep 10 13:16:24 2018 (r479409)
+++ head/Mk/bsd.options.mk Mon Sep 10 13:16:27 2018 (r479410)
@@ -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
+_REALLY_ALL_POSSIBLE_OPTIONS:= ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE}
+_REALLY_ALL_POSSIBLE_OPTIONS:= ${_REALLY_ALL_POSSIBLE_OPTIONS:O:u}
-.if empty(PORT_OPTIONS:MEXAMPLES)
-PLIST_SUB+= PORTEXAMPLES="@comment "
-.else
-PLIST_SUB+= PORTEXAMPLES=""
-.endif
+# 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?=
More information about the svn-ports-head
mailing list