aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.options.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 22ec6a6562a1..bfdf348c1cda 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -110,6 +110,15 @@
# ${opt}_USE_OFF= FOO=bar When option is disabled, it will enable
# USE_FOO+= bar
#
+# ${opt}_VARS= FOO=bar When option is enabled, it will run
+# FOO= bar
+# ${opt}_VARS= FOO+=bar When option is enabled, it will run
+# FOO+= bar
+# ${opt}_VARS_OFF= FOO=bar When option is disabled, it will run
+# FOO= bar
+# ${opt}_VARS_OFF= FOO+=bar When option is disabled, it will run
+# FOO+= bar
+#
# For each of:
# ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS CONFLICTS_BUILD
# CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DISTFILES EXTRA_PATCHES EXTRACT_ONLY
@@ -463,6 +472,16 @@ _u= ${option:C/=.*//g}
USE_${_u:tu}+= ${option:C/.*=//g:C/,/ /g}
. endfor
. endif
+. if defined(${opt}_VARS)
+. for var in ${${opt}_VARS}
+_u= ${var:C/=.*//}
+. if ${_u:M*+}
+${_u:C/.$//:tu}+= ${var:C/[^+]*\+=//:C/^"(.*)"$$/\1/}
+. else
+${_u:tu}= ${var:C/[^=]*=//:C/^"(.*)"$$/\1/}
+. endif
+. endfor
+. endif
. if defined(${opt}_CONFIGURE_ENABLE)
. for iopt in ${${opt}_CONFIGURE_ENABLE}
CONFIGURE_ARGS+= --enable-${iopt}
@@ -501,6 +520,16 @@ _u= ${option:C/=.*//g}
USE_${_u:tu}+= ${option:C/.*=//g:C/,/ /g}
. endfor
. endif
+. if defined(${opt}_VARS_OFF)
+. for var in ${${opt}_VARS_OFF}
+_u= ${var:C/=.*//}
+. if ${_u:M*+}
+${_u:C/.$//:tu}+= ${var:C/[^+]*\+=//:C/^"(.*)"$$/\1/}
+. else
+${_u:tu}= ${var:C/[^=]*=//:C/^"(.*)"$$/\1/}
+. endif
+. endfor
+. endif
. if defined(${opt}_CONFIGURE_ENABLE)
. for iopt in ${${opt}_CONFIGURE_ENABLE}
CONFIGURE_ARGS+= --disable-${iopt:C/=.*//}