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
@@ -4496,6 +4496,66 @@
+
+ OPT_VARS
+ and
+ OPT_VARS_OFF
+
+ Provides a generic way to set and append to
+ variables.
+
+ Before using
+ OPT_VARS and
+ OPT_VARS_OFF,
+ see if there is already a more specific helper available in
+ .
+
+ When option OPT is selected,
+ and OPT_VARS
+ defined,
+ key=value
+ and
+ key+=value
+ pairs are evaluated from
+ OPT_VARS. An
+ = cause the existing value of
+ KEY to be overwritten, an
+ += appends to the value.
+ OPT_VARS_OFF
+ works the same way, but when OPT is not
+ selected.
+
+ OPTIONS_DEFINE= OPT1 OPT2 OPT3
+OPT1_VARS= also_build+=bin1
+OPT2_VARS= also_build+=bin2
+OPT3_VARS= bin3_build=yes
+OPT3_VARS_OFF= bin3_build=no
+
+MAKE_ARGS= ALSO_BUILD="${ALSO_BUILD}" BIN3_BUILD="${BIN3_BUILD}"
+
+ is equivalent to:
+
+ OPTIONS_DEFINE= OPT1 OPT2
+
+MAKE_ARGS= ALSO_BUILD="${ALSO_BUILD}" BIN3_BUILD="${BIN3_BUILD}"
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPT1}
+ALSO_BUILD+= bin1
+.endif
+
+.if ${PORT_OPTIONS:MOPT2}
+ALSO_BUILD+= bin2
+.endif
+
+.if ${PORT_OPTIONS:MOPT2}
+BIN3_BUILD= yes
+.else
+BIN3_BUILD= no
+.endif
+
+
Dependencies