diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-11-09 23:04:15 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-11-10 19:19:41 +0100 |
commit | 488cf181a5aa5a4546b6190bdc93c3aec215f9a8 (patch) | |
tree | d4a7e8db468218b5b0d7edd9a600adb78609c2e5 | |
parent | 3829a75eab0871b1466589d93f57874355a94406 (diff) | |
download | ptxdist-488cf181a5aa5a4546b6190bdc93c3aec215f9a8.tar.gz ptxdist-488cf181a5aa5a4546b6190bdc93c3aec215f9a8.tar.xz |
add macros to simplify meson options
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | rules/pre/000-option-disabled.make | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rules/pre/000-option-disabled.make b/rules/pre/000-option-disabled.make index 6eaecf79a..9f679677b 100644 --- a/rules/pre/000-option-disabled.make +++ b/rules/pre/000-option-disabled.make @@ -99,4 +99,28 @@ define ptx/onoff $(call ptx/ifdef, $(1), ON, OFF) endef + +# +# $(call ptx/truefalse, PTXCONF_SYMBOL) returns "true" or "false" +# depending on the symbol is defined or not +# +# $(call ptx/truefalse, PTXCONF_SYMBOL) +# $1 +# +define ptx/truefalse +$(call ptx/ifdef, $(1), true, false) +endef + + +# +# $(call ptx/falsetrue, PTXCONF_SYMBOL) returns "true" or "false" +# depending on the symbol is defined or not +# +# $(call ptx/falsetrue, PTXCONF_SYMBOL) +# $1 +# +define ptx/falsetrue +$(call ptx/ifdef, $(1), false, true) +endef + # vim: syntax=make |