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 <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-05-24 16:49:58 -05:00 committed by Anas Nashif
commit cb16f5ab9f

View file

@ -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)