Index: bsd.options.mk =================================================================== --- bsd.options.mk (revision 358421) +++ bsd.options.mk (working copy) @@ -95,6 +95,10 @@ # ${opt}_QMAKE_OFF When option is disabled, it will add its content to # the QMAKE_ARGS. # +# ${opt}_ENABLES When opt is enabled, options named in ENABLES will +# get enabled too +# ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are +# 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 @@ -383,6 +387,22 @@ NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} .endfor +# Enable options implied by other options +.for count in ${PORT_OPTIONS} +. for opt in ${PORT_OPTIONS} +PORT_OPTIONS+= ${${opt}_ENABLES} +. endfor +.endfor + +# Prevent options that conflict +.for opt in ${PORT_OPTIONS} +. for conflict in ${${opt}_PREVENTS} +. if ${PORT_OPTIONS:M${conflict}} +IGNORE= Option ${conflict} conflicts with option ${opt} +. endif +. endfor +.endfor + # Finally, add options required by slave ports PORT_OPTIONS+= ${OPTIONS_SLAVE}