kbuild: add dtc as dependency on .dtb files
authorRob Herring <robh@kernel.org>
Tue, 27 Feb 2018 23:49:57 +0000 (17:49 -0600)
committerStricted <info@stricted.net>
Fri, 21 May 2021 20:28:16 +0000 (22:28 +0200)
If dtc is rebuilt, we should rebuild .dtb files with the new dtc.

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

index 4661de07300eac9d6f85703142c92727671210ca..16c0af229c849af56093b1c18654f12e3f13b204 100644 (file)
@@ -306,10 +306,10 @@ 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)
 
-$(obj)/%.dtbo: $(src)/%.dts FORCE
+$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
        $(call if_changed_dep,dtc)
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)