aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2012-06-01 09:06:15 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2012-06-01 09:06:15 +0000
commita16cae4f922e14746bd393bd5ca7d881f16a763a (patch)
tree75243e6846e2f26ee7cfe504369660c6a0e10f8e /Mk/bsd.options.mk
parentc39bfa2cc39ca44fdc995fc86b49f39cc9a43a21 (diff)
downloadports-a16cae4f922e14746bd393bd5ca7d881f16a763a.tar.gz
ports-a16cae4f922e14746bd393bd5ca7d881f16a763a.zip
by default optionsng sort the options before prompting to them.
add a new KNOB for maintainers: NO_OPTIONS_SORT to prevent from sorting the options. Requested by: osa@
Notes
Notes: svn path=/head/; revision=297932
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r--Mk/bsd.options.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 40636247826f..77d5964bdada 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -155,6 +155,18 @@ NOPORTEXAMPLES= yes
WITHOUT_NLS= yes
.endif
+.if defined(NO_OPTIONS_SORT)
+_SORTED_OPTIONS:= ${ALL_OPTIONS}
+ALL_OPTIONS:=
+.for opt in ${OPTIONS_DEFINE}
+.if ${_SORTED_OPTIONS:M${opt}}
+ALL_OPTIONS+= ${opt}
+.endif
+.endfor
+.undef opt
+.undef _SORTED_OPTIONS
+.endif
+
### to be removed once old OPTIONS disappear
.for opt in ${ALL_OPTIONS}
.if empty(PORT_OPTIONS:M${opt})