From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/2] Add macro 'noyes' as reverse of 'yesno'
Date: Mon, 25 Oct 2021 15:09:09 +0200 [thread overview]
Message-ID: <20211025130910.7257-2-ada@thorsis.com> (raw)
In-Reply-To: <20211025130910.7257-1-ada@thorsis.com>
This will be useful for some packages using scons.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
doc/ref_make_macros.rst | 3 +++
rules/pre/000-option-disabled.make | 12 ++++++++++++
2 files changed, 15 insertions(+)
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))),
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2021-10-25 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 13:09 [ptxdist] [PATCH 0/2] gpsd: Allow logging Alexander Dahl
2021-10-25 13:09 ` Alexander Dahl [this message]
2021-11-05 7:55 ` [ptxdist] [APPLIED] Add macro 'noyes' as reverse of 'yesno' Michael Olbrich
2021-10-25 13:09 ` [ptxdist] [PATCH 2/2] gpsd: Make more prepare options configurable Alexander Dahl
2021-11-05 7:55 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025130910.7257-2-ada@thorsis.com \
--to=ada@thorsis.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox