Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -4390,6 +4390,68 @@ .endif + + <varname><replaceable>OPT</replaceable>_IMPLIES</varname> + + Provides a way to add dependencies between options. + + When OPT is enabled, all the + options listed in this variable will be enabled too. Using + the OPT_CONFIGURE_ENABLE + described earlier to illustrate: + + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_IMPLIES= OPT2 + +OPT1_CONFIGURE_ENABLE= opt1 +OPT2_CONFIGURE_ENABLE= opt2 + + Is equivalent to: + + OPTIONS_DEFINE= OPT1 OPT2 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT1} +CONFIGURE_ARGS+= --enable-opt1 +.else +CONFIGURE_ARGS+= --disable-opt1 +.endif + +.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1} +CONFIGURE_ARGS+= --enable-opt2 +.else +CONFIGURE_ARGS+= --disable-opt2 +.endif + + + + <varname><replaceable>OPT</replaceable>_PREVENTS</varname> + + Provides a way to add conflicts between options. + + When OPT is enabled, all the + options listed in this variable must be disabled. For example: + + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_PREVENTS= OPT2 + + Is roughly equivalent to: + + OPTIONS_DEFINE= OPT1 OPT2 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1} +BROKEN= Option OPT1 conflicts with OPT2 (select only one) +.endif + + The only difference is that the first one will write an + error after running make config, + suggesting changing the selected options. + + Dependencies