From: Marco Felsch <m.felsch@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] doc: add ptx/truefalse macro description
Date: Wed, 13 Mar 2019 15:33:23 +0100 [thread overview]
Message-ID: <20190313143323.28444-1-m.felsch@pengutronix.de> (raw)
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
doc/ref_manual.rst | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/doc/ref_manual.rst b/doc/ref_manual.rst
index e2be86060..4444e0192 100644
--- a/doc/ref_manual.rst
+++ b/doc/ref_manual.rst
@@ -1201,6 +1201,33 @@ Depending on the state of FOO_VARIABLE this line results into
FOO_CONF_OPT += --with-something=/usr (if FOO_VARIABLE is set)
FOO_CONF_OPT += --with-something=none (if FOO_VARIABLE is unset)
+ptx/truefalse
+~~~~~~~~~~~~~
+
+To convert the state (set/unset) of a variable into a ``true/false``
+string use the ``ptx/truefalse`` macro.
+If the given <variable> is set this macro expands to
+the string ``true``, if unset to ``false`` instead.
+
+Usage:
+
+.. code-block:: none
+
+ -Dwith-something=$(call ptx/truefalse,<variable>)
+
+An example:
+
+.. code-block:: make
+
+ FOO_CONF_OPT += -Dwith-something=$(call ptx/truefalse,<variable>)
+
+Depending on the state of FOO_VARIABLE this line results into
+
+.. code-block:: make
+
+ FOO_CONF_OPT += -Dwith-something=true (if FOO_VARIABLE is set)
+ FOO_CONF_OPT += -Dwith-something=false (if FOO_VARIABLE is unset)
+
ptx/get-alternative
~~~~~~~~~~~~~~~~~~~
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
reply other threads:[~2019-03-13 14:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190313143323.28444-1-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--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