kbuild: add dtc as dependency on .dtb files
authorRob Herring <robh@kernel.org>
Tue, 27 Feb 2018 23:49:57 +0000 (17:49 -0600)
committerRob Herring <robh@kernel.org>
Thu, 1 Mar 2018 18:02:24 +0000 (12:02 -0600)
If dtc is rebuilt, we should rebuild .dtb files with the new dtc.

Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
scripts/Makefile.lib

index 1bc2f90cb8c0990b52af609ad87c2e094a690808..6aeb91524c763f256598f72d5517bd01ba36ed47 100644 (file)
@@ -316,7 +316,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
                -d $(depfile).dtc.tmp $(dtc-tmp) ; \
        cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-$(obj)/%.dtb: $(src)/%.dts FORCE
+$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
        $(call if_changed_dep,dtc)
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)