mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org, rcz@pengutronix.de, mol@pengutronix.de
Subject: Re: [PATCH v2] kbuild: use printf instead of echo -e extension
Date: Thu, 13 Apr 2023 11:40:20 +0200	[thread overview]
Message-ID: <169e8325-9b89-5cb1-cd90-cf5a0f817b02@pengutronix.de> (raw)
In-Reply-To: <20230413092043.GW19113@pengutronix.de>

On 13.04.23 11:20, Sascha Hauer wrote:
> Hi Ahmad,
> 
> The subject seems outdated, you are not using printf at all here.

Oh right. I tried printf first, but foreach concatenates with
spaces in-between and printf ignores everything not referenced
by the format string...

> On Thu, Apr 13, 2023 at 10:45:47AM +0200, Ahmad Fatoum wrote:
>> We are using echo -e, so the \n in the string being echo'd are
>> interpreted. As -e is not POSIX and dash doesn't provide it,
>> we use a strange /usr/bin/env echo -e construct hoping that
>> whatever non-builtin echo is first in the search path supports -e.
>>
>> As the new lines are just used to separate CPP directives, we can
>> just pass the directives as $(CPP) flags. This has the same result,
>> but is potable and avoids NixOS complaining when building barebox.
> 
> s/potable/portable/

Will fix.

> Good idea to get rid of the echo -e dependency entirely, I like it :)
> 
> You could replace the '-' for stdin with /dev/null and then drop the
> echo |. Maybe this makes it a bit easier to read.

I had thought about that, but deemed

  In file included from <command-line>:3:
  /home/afa/fragment1.dts:6:2: warning: #warning hey [-Wcpp]

to be less confusing than it mentioning /dev/null. Now that I actually
tried it out though, the warning also references command-line, so
you will change for v3.

Thanks,
Ahmad

> 
> Sascha
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




      reply	other threads:[~2023-04-13  9:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  8:45 Ahmad Fatoum
2023-04-13  9:20 ` Sascha Hauer
2023-04-13  9:40   ` Ahmad Fatoum [this message]

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=169e8325-9b89-5cb1-cd90-cf5a0f817b02@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mol@pengutronix.de \
    --cc=rcz@pengutronix.de \
    --cc=sha@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