FreeBSD Bugzilla – Attachment 155062 Details for
Bug 191144
[patch] Mk/bsd.options.mk: Add opt_IMPLIES and opt_PREVENTS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
IMPLIES/PREVENTS
impl_prev.patch (text/plain), 2.23 KB, created by
Adam Weinberger
on 2015-03-31 16:49:06 UTC
(
hide
)
Description:
IMPLIES/PREVENTS
Filename:
MIME Type:
Creator:
Adam Weinberger
Created:
2015-03-31 16:49:06 UTC
Size:
2.23 KB
patch
obsolete
>Index: bsd.options.mk >=================================================================== >--- bsd.options.mk (revision 382833) >+++ bsd.options.mk (working copy) >@@ -96,6 +96,11 @@ > # ${opt}_QMAKE_OFF When option is disabled, it will add its content to > # the QMAKE_ARGS. > # >+# ${opt}_IMPLIES When opt is enabled, options named in IMPLIES will >+# get enabled too. >+# ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are >+# also enabled, it will produce an error. >+# > # ${opt}_USE= FOO=bar When option is enabled, it will enable > # USE_FOO+= bar > # If you need more than one option, you can do >@@ -387,6 +392,14 @@ > NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} > .endfor > >+## Enable options implied by other options >+# _PREVENTS is handled in bsd.port.mk:pre-check-config >+.for count in ${PORT_OPTIONS} >+. for opt in ${PORT_OPTIONS} >+PORT_OPTIONS+= ${${opt}_IMPLIES} >+. endfor >+.endfor >+ > # Finally, add options required by slave ports > PORT_OPTIONS+= ${OPTIONS_SLAVE} > >Index: bsd.port.mk >=================================================================== >--- bsd.port.mk (revision 382833) >+++ bsd.port.mk (working copy) >@@ -5361,6 +5361,18 @@ > . undef OPTNOCHECK > .endfor > .undef multi >+ >+.for opt in ${PORT_OPTIONS} >+. for conflict in ${${opt}_PREVENTS} >+. if ${PORT_OPTIONS:M${conflict}} >+. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) >+OPTIONS_WRONG_PREVENTS+= ${opt} >+. endif >+OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} >+. endif >+. endfor >+.endfor >+.undef conflict > .undef opt > .endif #pre-check-config > >@@ -5375,7 +5387,13 @@ > .for radio in ${OPTIONS_WRONG_RADIO} > @${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" > .endfor >-.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) >+.if defined(OPTIONS_WRONG_PREVENTS) >+ @${ECHO_MSG} "====> Two or more enabled options conflict with each other" >+. for prevents in ${OPTIONS_WRONG_PREVENTS} >+ @${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" >+. endfor >+.endif >+.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) > _CHECK_CONFIG_ERROR= true > .endif > .endif # _check-config
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 191144
:
143890
|
143927
|
147180
|
154870
|
155061
| 155062 |
160162