* [ptxdist] [PATCH] doc: add ptx/truefalse macro description
@ 2019-03-13 14:33 Marco Felsch
0 siblings, 0 replies; only message in thread
From: Marco Felsch @ 2019-03-13 14:33 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-13 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 14:33 [ptxdist] [PATCH] doc: add ptx/truefalse macro description Marco Felsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox