From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Rouven Czerwinski <r.czerwinski@pengutronix.de>,
barebox@lists.infradead.org
Subject: Re: [PATCH] kbuild: dtc: use env to resolve echo
Date: Thu, 20 Jan 2022 10:14:33 +0100 [thread overview]
Message-ID: <20220120091433.GJ7102@pengutronix.de> (raw)
In-Reply-To: <20220120085649.GP23490@pengutronix.de>
On Thu, Jan 20, 2022 at 09:56:49AM +0100, Sascha Hauer wrote:
> On Thu, Jan 20, 2022 at 08:47:33AM +0100, Rouven Czerwinski wrote:
> > Posix does not mandate to have binaries within a certain path, but
> > rather that the utilities may be available. Use env to resolve and call
> > echo from PATH.
> >
> > Fixes: 2ae7ac7ab2f1 ("kbuild: dtc: Allow adding device tree fragments via config")
> >
> > Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> > ---
> > scripts/Makefile.lib | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > index 13b1789c01..94ca1b771b 100644
> > --- a/scripts/Makefile.lib
> > +++ b/scripts/Makefile.lib
> > @@ -340,7 +340,7 @@ dts-frags = $(subst $(quote),,$(CONFIG_EXTERNAL_DTS_FRAGMENTS))
> > quiet_cmd_dtc = DTC $@
> > # For compatibility between make 4.2 and 4.3
> > H := \#
> > -cmd_dtc = /bin/echo -e '$(H)define $(subst -,_,$(*F))_dts 1\n'$(foreach f,$< $(dts-frags),'$(H)include "$(f)"\n') | \
>
> Why hardcode /bin/echo anyway and not use plain 'echo' instead. I assume
> because echo can be a shell builtin, but are there shells out there
> where the builtin is not enough?
The builtin echo implementations are not very compatible. Better use printf
instead. For example, echo from dash (the default /bin/sh in Debian) does
not support '-e'.
Michael
--
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2022-01-20 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 7:47 Rouven Czerwinski
2022-01-20 8:36 ` Trent Piepho
2022-01-20 8:46 ` Rouven Czerwinski
2022-01-20 8:56 ` Sascha Hauer
2022-01-20 9:14 ` Michael Olbrich [this message]
2022-02-21 14:41 ` Sascha Hauer
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=20220120091433.GJ7102@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=r.czerwinski@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