From cb16f5ab9f4d12ac2fd4a5d05316f7f2bf4d0ad0 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Wed, 24 May 2017 16:49:58 -0500 Subject: [PATCH] scripts: Makefile.lib: Add dependency for DTS overlay This patch adds a dependency for the DTS overlay so that the DTS is compiled when the state of the overlay file changes. Change-Id: I2affe67f90f56b1d97384d5cd4e3026abed24253 Signed-off-by: Andy Gross --- scripts/Makefile.lib | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 53868907e82..2becb903ee4 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -282,9 +282,11 @@ cmd_dt_S_dtb= \ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) +DTS_OVERLAY ?= $(PROJECT_BASE)/$(BOARD_NAME).overlay + quiet_cmd_dtc = DTC $@ cmd_dtc = echo '\#include "$(notdir $<)"' > dts/$(ARCH)/$(notdir $<)_pre_compiled ; \ - if test -e $(PROJECT_BASE)/$(BOARD_NAME).overlay; then \ + if test -e $(DTS_OVERLAY); then \ echo '\#include "$(BOARD_NAME).overlay"' >> dts/$(ARCH)/$(notdir $<)_pre_compiled ; \ fi ; \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) dts/$(ARCH)/$(notdir $<)_pre_compiled ; \ @@ -296,7 +298,7 @@ cmd_dtc = echo '\#include "$(notdir $<)"' > dts/$(ARCH)/$(notdir $<)_pre_compile $(obj)/%.dtb: $(src)/%.dts FORCE $(call if_changed_dep,dtc) -$(obj)/%.dts_compiled: $(src)/%.dts FORCE +$(obj)/%.dts_compiled: $(src)/%.dts $(DTS_OVERLAY) FORCE $(call if_changed_dep,dtc) dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)