svn commit: r305300 - head/Mk
Baptiste Daroussin
bapt at FreeBSD.org
Fri Oct 5 13:43:46 UTC 2012
Author: bapt
Date: Fri Oct 5 13:43:45 2012
New Revision: 305300
URL: http://svn.freebsd.org/changeset/ports/305300
Log:
Options can now be overridden from command line using
WITH/WITHOUT.
Name has been proprosed by gahr during brainstorming on ports@
PR: ports/170180
Submitted by: ohauer
Modified:
head/Mk/bsd.options.mk
Modified: head/Mk/bsd.options.mk
==============================================================================
--- head/Mk/bsd.options.mk Fri Oct 5 12:45:19 2012 (r305299)
+++ head/Mk/bsd.options.mk Fri Oct 5 13:43:45 2012 (r305300)
@@ -21,6 +21,8 @@
# OTPIONS_MULTI_${NAME} - List of OPTIONS grouped as multiple-choice
# (for the multi named as ${NAME} as defined in
# OPTIONS_MULTI)
+# WITH Set options from the command line
+# WITHOUT Unset options from the command line
##
# Set all the options available for the ports, beginning with the
@@ -199,6 +201,19 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
.endif
+## Cmdline always win over the rest
+.for opt in ${WITH}
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+PORT_OPTIONS+= ${opt}
+. endif
+.endfor
+PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
+
+.for opt in ${WITHOUT}
+PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+.endfor
+.undef opt
+
## Now some compatibility
.if empty(PORT_OPTIONS:MDOCS)
NOPORTDOCS= yes
More information about the svn-ports-head
mailing list