]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
scripts/Makefile.lib: Add dtsi include files as deps for building DTB
authorSughosh Ganu <sughosh.ganu@linaro.org>
Tue, 22 Aug 2023 17:40:04 +0000 (23:10 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 29 Aug 2023 17:37:55 +0000 (13:37 -0400)
At the time of building the DTB, some dtsi files can be selected for
inclusion. Have these dtsi files as dependencies for the DTB
target. This also ensures generation or updating the dtsi files if
need be.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
scripts/Makefile.lib

index 368b5a3e28ab80d78dc7af7612e2bf51dc1154e7..8c5e25c31c5f44ae0182a2180238b5f37b290c03 100644 (file)
@@ -334,7 +334,9 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
                ; \
        sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
+dtsi_include_list_deps = $(addprefix $(obj)/,$(subst $(quote),,$(dtsi_include_list)))
+
+$(obj)/%.dtb: $(src)/%.dts $(DTC) $(dtsi_include_list_deps) FORCE
        $(call if_changed_dep,dtc)
 
 pre-tmp = $(subst $(comma),_,$(dot-target).pre.tmp)