aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2013-06-14 20:59:02 +0800
committertijl <tijl@FreeBSD.org>2013-06-14 20:59:02 +0800
commit4ba4b75fd058ba45c8cb2858f64b8b01c8f5e275 (patch)
tree1fcdb7d64418d0f97111dc555145f686bfbd4588 /Mk
parent2be1ef89b89ab039b28cc2ebe33b7f9d6ca3f8ae (diff)
downloadfreebsd-ports-gnome-4ba4b75fd058ba45c8cb2858f64b8b01c8f5e275.tar.gz
freebsd-ports-gnome-4ba4b75fd058ba45c8cb2858f64b8b01c8f5e275.tar.zst
freebsd-ports-gnome-4ba4b75fd058ba45c8cb2858f64b8b01c8f5e275.zip
Let config-conditional take options configured in make.conf into account.
The option dialog will not appear if all options have been configured before, either using the dialog or in make.conf. This means you can set options once for all ports in make.conf and not have dialogs pop up if those are the only options. Also let config-conditional run make config instead of do-config. Make config handles NO_DIALOG and pre-config. Discussed with: danfe Approved by: portmgr (bapt)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.options.mk23
-rw-r--r--Mk/bsd.port.mk8
2 files changed, 18 insertions, 13 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 4c36bd7f9904..36c5be8ba8e4 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -45,14 +45,12 @@
##
# Set all the options available for the ports, beginning with the
# global ones and ending with the ones decided by the maintainer.
-# Options global to the entire ports tree
+
.if !defined(OPTIONSMKINCLUDED)
OPTIONSMKINCLUDED= bsd.options.mk
OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
-GLOBAL_OPTIONS= DOCS NLS EXAMPLES IPV6
-
# Set the default values for the global options, as defined by portmgr
.if !defined(NOPORTDOCS)
PORT_OPTIONS+= DOCS
@@ -116,8 +114,10 @@ COMPLETE_OPTIONS_LIST+= ${OPTIONS_${otype}_${m}}
.if defined(OPTIONS_OVERRIDE)
# Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done
# before
+NEW_OPTIONS=
PORT_OPTIONS:= ${OPTIONS_OVERRIDE}
.else
+NEW_OPTIONS= ${COMPLETE_OPTIONS_LIST}
## Set default options defined by the port maintainer
. for opt in ${OPTIONS_DEFAULT}
@@ -129,6 +129,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
. for opt in ${OPTIONS_SET}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -136,12 +137,14 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
## Remove the options excluded system-wide (set by user in make.conf)
. for opt in ${OPTIONS_UNSET}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_SET}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -149,6 +152,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
## Unset the options excluded per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_UNSET}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
## options files (from dialog)
@@ -174,12 +178,14 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
. for opt in ${OPTIONS_FILE_SET}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
.for opt in ${OPTIONS_FILE_UNSET}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
.endfor
.undef opt
@@ -190,6 +196,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
. for opt in ${OPTIONS_SET_FORCE}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -197,12 +204,14 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
## Remove the options excluded system-wide (set by user in make.conf)
. for opt in ${OPTIONS_UNSET_FORCE}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_SET_FORCE}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -210,6 +219,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
## Unset the options excluded per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_UNSET_FORCE}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
@@ -217,12 +227,14 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
.for opt in ${WITH}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
PORT_OPTIONS+= ${opt}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
.endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
.for opt in ${WITHOUT}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
.endfor
.for opt in ${OPTIONS_SLAVE}
@@ -262,8 +274,3 @@ WITH_${opt}:= true
.endfor
.endif
###
-
-_OPTIONS_WITHOUT_GLOBALS:= ${COMPLETE_OPTIONS_LIST}
-.for opt in ${GLOBAL_OPTIONS}
-_OPTIONS_WITHOUT_GLOBALS:= ${_OPTIONS_WITHOUT_GLOBALS:N${opt}}
-.endfor
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 934d8c6440eb..bb9480a3494d 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -6168,11 +6168,9 @@ config-recursive:
.endif # config-recursive
.if !target(config-conditional)
-config-conditional: pre-config
-.if defined(COMPLETE_OPTIONS_LIST) && !empty(_OPTIONS_WITHOUT_GLOBALS) && !defined(NO_DIALOG)
-. if !defined(_FILE_COMPLETE_OPTIONS_LIST) || ${COMPLETE_OPTIONS_LIST:O} != ${_FILE_COMPLETE_OPTIONS_LIST:O}
- @cd ${.CURDIR} && ${MAKE} do-config;
-. endif
+config-conditional:
+.if !empty(NEW_OPTIONS)
+ @cd ${.CURDIR} && ${MAKE} config;
.endif
.endif # config-conditional