diff options
-rw-r--r-- | doc/ref_make_macros.rst | 3 | ||||
-rw-r--r-- | rules/pre/000-option-disabled.make | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst index ae65cb940..730687daf 100644 --- a/doc/ref_make_macros.rst +++ b/doc/ref_make_macros.rst @@ -673,6 +673,7 @@ Usage: $(call ptx/wow, VARIABLE) $(call ptx/wwo, VARIABLE) $(call ptx/yesno, VARIABLE) + $(call ptx/noyes, VARIABLE) $(call ptx/truefalse, VARIABLE) $(call ptx/falsetrue, VARIABLE) $(call ptx/onoff, VARIABLE) @@ -694,6 +695,8 @@ These are useful for ``<PKG>_CONF_OPT`` variables, and expand as follows: +--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/yesno | ``yes`` | ``no`` | autoconf cache vars | +--------------------+-------------------------------+---------------------------------+---------------------+ +| ptx/noyes | ``no`` | ``yes`` | scons | ++--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/truefalse | ``true`` | ``false`` | meson | +--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/falsetrue | ``false`` | ``true`` | meson | diff --git a/rules/pre/000-option-disabled.make b/rules/pre/000-option-disabled.make index fa0e8a294..9a068b39c 100644 --- a/rules/pre/000-option-disabled.make +++ b/rules/pre/000-option-disabled.make @@ -146,6 +146,18 @@ $(call ptx/ifdef, $(1), yes, no) endef +# +# $(call ptx/noyes, PTXCONF_SYMBOL) returns "no" or "yes" +# depending on the symbol is defined or not +# +# $(call ptx/noyes, PTXCONF_SYMBOL) +# $1 +# +define ptx/noyes +$(call ptx/ifdef, $(1), no, yes) +endef + + define ptx/config-foo $(strip $(if $($(strip $(1))), $(if $(call remove_quotes,$($(2))), |