Index: bsd.options.mk =================================================================== --- bsd.options.mk (revision 358193) +++ bsd.options.mk (working copy) @@ -98,6 +98,10 @@ # ${opt}_QMAKE_OFF When option is disabled, it will add its content to # the QMAKE_ARGS. # +# ${opt}_IMPLIES When option is enabled, options named in its contents will +# be enabled too +# ${opt}_PRECLUDES When option is enabled, enabling any of the options +# in its content 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 @@ -386,6 +390,20 @@ NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} .endfor +# Enable options implied by other options +.for opt in ${PORT_OPTIONS} +PORT_OPTIONS+= ${${opt}_IMPLIES} +.endfor + +# Prevent options that conflict +.for opt in ${PORT_OPTIONS} +. for conflict in ${${opt}_PRECLUDES} +. if ${PORT_OPTIONS:M${conflict}} +IGNORE= Option ${opt} conflicts with option ${conflict} +. endif +. endfor +.endfor + # Finally, add options required by slave ports PORT_OPTIONS+= ${OPTIONS_SLAVE}