U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] kbuild: fix DTB .cmd source variable
Date: Tue, 26 Feb 2019 12:20:26 -0700	[thread overview]
Message-ID: <20190226192027.9110-2-swarren@wwwdotorg.org> (raw)
In-Reply-To: <20190226192027.9110-1-swarren@wwwdotorg.org>

From: Stephen Warren <swarren@nvidia.com>

*.dts are processed using a custom command, then the C pre-processor is
run on them, then they are compiled using dtc. Thus, the dependency
files generated by both cpp and dtc reference a temporary file name
rather than the actual source file. While this information isn't used
for any purpose by the build system, and hence this causes no functional
issue, it does cause the dependency files to contain invalid and
confusing data, which is unhelpful while debugging build problems. Fix
this using sed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 704d644f6faa..ec5c41ec5616 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -301,7 +301,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 	$(DTC) -O dtb -o $@ -b 0 \
 		-i $(dir $<) $(DTC_FLAGS) \
 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
-	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
+	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
+	sed -i "s:$(pre-tmp):$(<):" $(depfile)
 
 $(obj)/%.dtb: $(src)/%.dts FORCE
 	$(call if_changed_dep,dtc)
-- 
2.20.1

  reply	other threads:[~2019-02-26 19:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 19:20 [U-Boot] [PATCH 1/2] kbuild: make arch-dtbs target PHONY Stephen Warren
2019-02-26 19:20 ` Stephen Warren [this message]
2019-02-27  4:58   ` [U-Boot] [PATCH 2/2] kbuild: fix DTB .cmd source variable Masahiro Yamada
2019-02-28 23:56   ` [U-Boot] [U-Boot,2/2] " Tom Rini
2019-02-27  2:17 ` [U-Boot] [PATCH 1/2] kbuild: make arch-dtbs target PHONY Masahiro Yamada
2019-02-27  2:36   ` Masahiro Yamada
2019-02-27 17:50     ` Stephen Warren
2019-02-27  5:09 ` Masahiro Yamada
2019-02-28 16:24 ` Stephen Warren
2019-02-28 23:56 ` [U-Boot] [U-Boot,1/2] " 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=20190226192027.9110-2-swarren@wwwdotorg.org \
    --to=swarren@wwwdotorg.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