diff options
author | Stephen Warren | 2019-02-26 12:20:26 -0700 |
---|---|---|
committer | Tom Rini | 2019-02-28 14:21:46 -0500 |
commit | 8422ad51652f8f33acd3f03f24ec2aea73083eb7 (patch) | |
tree | 43699f19da48d7535839ab83a81aa622e4341e72 /scripts/Makefile.lib | |
parent | 2737dfe096b6c34654734a5a4dc5f4b4962c5617 (diff) |
kbuild: fix DTB .cmd source variable
*.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>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 704d644f6fa..ec5c41ec561 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) |