aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2012-07-16 11:38:36 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2012-07-16 11:38:36 +0000
commit2bf821056342c5401164eecb27ae69689c0e8248 (patch)
tree089c6a757926e1e3b20b654fc15f27c7126feec2 /Mk
parent15707b6d57de2e0e8be17e1de8f132eaeb125457 (diff)
downloadports-2bf821056342c5401164eecb27ae69689c0e8248.tar.gz
ports-2bf821056342c5401164eecb27ae69689c0e8248.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.options.mk40
-rw-r--r--Mk/bsd.port.mk13
2 files changed, 41 insertions, 12 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index ae48591fb7df..0980f27aeffc 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -2,6 +2,25 @@
# $FreeBSD$
# Global options
#
+# OPTIONS_DEFINE - List of options this ports accept
+# OPTIONS_DEFINE_${ARCH} - List of options this ports accept and are
+# specific to ${ARCH}
+# OPTIONS_DEFAULT - List of options activated by default
+# OPTIONS_DEFAULT_${ARCH} - List of options activated by default for a
+# given arch
+#
+# OPTIONS_EXCLUDE_${ARCH} - List of options unsupported on a given ${ARCH}
+# ${OPTION}_DESC - Description the the ${OPTION}
+#
+# OPTIONS_SINGLE - List of radio choice grouped options
+# OPTIONS_MULTI - List of multiple-choice grouped options
+#
+# OPTIONS_SINGLE_${NAME} - List of OPTIONS grouped as radio choice (for
+# the single named as ${NAME} as defined in
+# OPTIONS_SINGLE)
+# OTPIONS_MULTI_${NAME} - List of OPTIONS grouped as multiple-choice
+# (for the multi named as ${NAME} as defined in
+# OPTIONS_MULTI)
##
# Set all the options available for the ports, beginning with the
@@ -27,11 +46,26 @@ PORT_OPTIONS+= NLS
PORT_OPTIONS+= EXAMPLES
.endif
+# Exclude per arch options
.for opt in ${OPTIONS_EXCLUDE_${ARCH}}
OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}}
OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}}
.endfor
+# Add per arch options
+.for opt in ${OPTIONS_DEFINE_${ARCH}}
+.if empty(OPTIONS_DEFINE:M${opt})
+OPTIONS_DEFINE+= ${opt}
+.endif
+.endfor
+
+# Add per arch defaults
+.for opt in ${OPTIONS_DEFAULT_${ARCH}}
+.if empty(OPTIONS_DEFAULT:M${opt}}
+OPTIONS_DEFAULT+= ${opt}
+.endif
+.endfor
+
# Append options set by the port Makefile
.for opt in ${OPTIONS_DEFINE}
ALL_OPTIONS+= ${opt}
@@ -98,7 +132,9 @@ 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})
PORT_OPTIONS+= ${opt}
+. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -109,7 +145,9 @@ 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})
PORT_OPTIONS+= ${opt}
+. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
@@ -139,7 +177,9 @@ 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})
PORT_OPTIONS+= ${opt}
+. endif
. endfor
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 19a3973a781d..b267a21b2752 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -809,18 +809,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
#
# Here are some variables used in various stages.
#
-# For options:
-# OPTIONS - List of what WITH_<option> options this port accept. The
-# format is <option> "<description>" [on|off]
-# Example:
-# FLEXRESP "Flexible response to events" off
-# which tell that an option WITH_FLEXRESP exists for this port,
-# that by default it is not defined, and that the description to
-# show to a user in the config dialog is "Flexible response to
-# events". If you have more than one option, just chain them
-# into a single variable. NOTE: To make options work, you need
-# to include bsd.port.pre.mk before you start testing the
-# WITH_xyz variables.
+# For options see bsd.options.mk
#
# For fetch:
#