aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-07-17 06:36:44 +0800
committerbapt <bapt@FreeBSD.org>2012-07-17 06:36:44 +0800
commit6d4efec773a04cbb50c039a211f5e0faf6708ec0 (patch)
treedc0af402f654cc162c50da818cce7df7b8fc7195 /Mk
parent3d6269415c80dbe8155ddd65c9450f6e0457bbaf (diff)
downloadfreebsd-ports-gnome-6d4efec773a04cbb50c039a211f5e0faf6708ec0.tar.gz
freebsd-ports-gnome-6d4efec773a04cbb50c039a211f5e0faf6708ec0.tar.zst
freebsd-ports-gnome-6d4efec773a04cbb50c039a211f5e0faf6708ec0.zip
compare options loading from /var/db/port/options and make.conf against the
complete list of options. COMPLETE_OPTIONS_LIST being OPTIONS_DEFINE + all the OPTIONS_SINGLE_* + all the OPTIONS_MULTI_*
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.options.mk15
-rw-r--r--Mk/bsd.port.mk9
2 files changed, 14 insertions, 10 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 0980f27aeffc..2b30b012c0f0 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -117,6 +117,15 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${O}}
ALL_OPTIONS:= ${ALL_OPTIONS:O:u}
+# complete list
+COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS}
+.for single in ${OPTIONS_SINGLE}
+COMPLETE_OPTIONS_LIST+= ${OPTIONS_SINGLE_${single}}
+.endfor
+.for multi in ${OPTIONS_MULTI}
+COMPLETE_OPTIONS_LIST+= ${OPTIONS_MULTI_${multi}}
+.endfor
+
## Now create the list of activated options
.if defined(OPTIONS_OVERRIDE)
# Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done
@@ -132,7 +141,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
## Set system-wide defined options (set by user in make.conf)
. for opt in ${OPTIONS_SET}
-. if !empty(OPTIONS_DEFINE:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
. endif
. endfor
@@ -145,7 +154,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_SET}
-. if !empty(OPTIONS_DEFINE:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
. endif
. endfor
@@ -177,7 +186,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
## Finish by using the options set by the port config dialog, if any
. for opt in ${OPTIONS_FILE_SET}
-. if !empty(OPTIONS_DEFINE:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
. endif
. endfor
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index b267a21b2752..e0e8c69bc100 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -6004,7 +6004,6 @@ sanity-config: _check-config
.if !target(pre-config)
pre-config:
-_COMPLETE_OPTIONS_LIST:= ${ALL_OPTIONS}
.for opt in ${ALL_OPTIONS}
. if empty(PORT_OPTIONS:M${opt})
DEFOPTIONS+= ${opt} ""${${opt}_DESC:Q} off
@@ -6014,7 +6013,6 @@ DEFOPTIONS+= ${opt} ""${${opt}_DESC:Q} on
.endfor
.for multi in ${OPTIONS_MULTI}
. for opt in ${OPTIONS_MULTI_${multi}}
-_COMPLETE_OPTIONS_LIST+= ${opt}
. if empty(PORT_OPTIONS:M${opt})
DEFOPTIONS+= ${opt} "M(${multi}): "${${opt}_DESC:Q} off
. else
@@ -6024,7 +6022,6 @@ DEFOPTIONS+= ${opt} "M(${multi}): "${${opt}_DESC:Q} on
.endfor
.for single in ${OPTIONS_SINGLE}
. for opt in ${OPTIONS_SINGLE_${single}}
-_COMPLETE_OPTIONS_LIST+= ${opt}
. if empty(PORT_OPTIONS:M${opt})
DEFOPTIONS+= ${opt} "S(${single}): "${${opt}_DESC:Q} off
. else
@@ -6032,8 +6029,6 @@ DEFOPTIONS+= ${opt} "S(${single}): "${${opt}_DESC:Q} on
. endif
. endfor
.endfor
-
-_COMPLETE_OPTIONS_LIST:= ${_COMPLETE_OPTIONS_LIST:u}
.undef multi
.undef single
.undef opt
@@ -6073,8 +6068,8 @@ config: pre-config
${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \
${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \
${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \
- ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${_COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \
- for i in ${_COMPLETE_OPTIONS_LIST}; do \
+ ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \
+ for i in ${COMPLETE_OPTIONS_LIST}; do \
if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \
${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \
else \