mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] doc: mention dedicated PTXdist macros to be used in rule files
Date: Fri, 22 Feb 2019 11:30:06 +0100	[thread overview]
Message-ID: <20190222103006.21943-1-jbe@pengutronix.de> (raw)

In order to simplify rule files, it's worth to use more of the provided
rule file macros PTXdist already provides.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 doc/dev_manual.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index f0c2e00ee..984e91cd4 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -909,6 +909,23 @@ file and add the correct parameters:
 .. important:: Please note the trailing ``PTXCONF_`` for each define. While Kconfig is
   using ``FOO_BAR``, the rule file must use ``PTXCONF_FOO_BAR`` instead.
 
+This kind of rule file style is sometimes error prone and hard to read. There
+is a simpler way available to handle these build-time options. PTXdist
+provides some macros to unify and simplify creating these options on demand.
+Using these macros makes the rule file looks like instead:
+
+.. code-block:: make
+
+    #
+    # autoconf
+    #
+    FOO_CONF_OPT := $(CROSS_AUTOCONF_USR) \
+        --$(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
+        --$(call ptx/wwo, PTXCONF_FOO_BAR)-bar
+
+Refer :ref:`Rule File Macro Reference <param_macros>` for further details about
+these kind of macros.
+
 It is a good practice to add both settings, e.g. ``--disable-debug``
 even if this is the default case. Sometimes ``configure`` tries to guess
 something and the binary result might differ depending on the build
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2019-02-22 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 10:30 Juergen Borleis [this message]
2019-02-22 11:42 ` Michael Olbrich
2019-02-22 11:46   ` Juergen Borleis

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=20190222103006.21943-1-jbe@pengutronix.de \
    --to=jbe@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