diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-05 13:43:45 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-05 13:43:45 +0000 |
commit | 9a79d8476ed5a36fc119c248fe3554ef585d5773 (patch) | |
tree | c3c8fd24ace17c97ad81d8a88b1ffa9d13f2a99d /Mk | |
parent | pkg-message was saying to add COMPAT_FREEBSD8 to kernel, this was supposed to be (diff) |
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
Notes
Notes:
svn path=/head/; revision=305300
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.options.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 2b30b012c0f0..f06442058099 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -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 |