aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-06-01 17:06:15 +0800
committerbapt <bapt@FreeBSD.org>2012-06-01 17:06:15 +0800
commitef590f70a894a574bffda53d1938e1937d39e403 (patch)
tree9e28816fcdbd6ce02b99da1cd2fff5aebe9666ef /Mk
parentb48158094415bf2637af0f790b75aa5846460534 (diff)
downloadfreebsd-ports-gnome-ef590f70a894a574bffda53d1938e1937d39e403.tar.gz
freebsd-ports-gnome-ef590f70a894a574bffda53d1938e1937d39e403.tar.zst
freebsd-ports-gnome-ef590f70a894a574bffda53d1938e1937d39e403.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@
Diffstat (limited to '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})