From: Roger Pau Monne <royger@FreeBSD.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] build/DTC: fix sed usage in DTC command
Date: Sat, 13 Feb 2021 11:06:32 +0100 [thread overview]
Message-ID: <20210213100632.6249-3-royger@FreeBSD.org> (raw)
In-Reply-To: <20210213100632.6249-1-royger@FreeBSD.org>
Current sed usage in the DTC command relies on GNU sed specific -i
option which has a slightly different syntax for BSD sed and always
expects an extension to be provided in order to create a backup file.
Instead drop the cat concatenation done before the sed call and use
sed itself to edit and concatenate the files.
No functional change intended.
Signed-off-by: Roger Pau Monn? <royger@FreeBSD.org>
---
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
---
scripts/Makefile.lib | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 56e9d54242..78543c6dd1 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -326,8 +326,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
-d $(depfile).dtc.tmp $(dtc-tmp) || \
(echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \
; \
- cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
- sed -i "s:$(pre-tmp):$(<):" $(depfile)
+ sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
$(obj)/%.dtb: $(src)/%.dts FORCE
$(call if_changed_dep,dtc)
--
2.30.1
next prev parent reply other threads:[~2021-02-13 10:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 10:06 [PATCH 0/2] Fixes for BSD sed compatibility Roger Pau Monne
2021-02-13 10:06 ` [PATCH 1/2] scripts/check-config.sh: fix to be compatible with BSD sed Roger Pau Monne
2021-02-13 16:42 ` Warner Losh
2021-02-18 4:45 ` Simon Glass
2021-02-25 13:25 ` Tom Rini
2021-02-13 10:06 ` Roger Pau Monne [this message]
2021-02-13 16:43 ` [PATCH 2/2] build/DTC: fix sed usage in DTC command Warner Losh
2021-02-22 9:17 ` Roger Pau Monné
2021-02-25 13:25 ` Tom Rini
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=20210213100632.6249-3-royger@FreeBSD.org \
--to=royger@freebsd.org \
--cc=u-boot@lists.denx.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