Skip to content

Commit 1a6c4b1

Browse files
Andy GrossAnas Nashif
authored andcommitted
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 <[email protected]>
1 parent ae8c659 commit 1a6c4b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/Makefile.lib

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,11 @@ cmd_dt_S_dtb= \
282282
$(obj)/%.dtb.S: $(obj)/%.dtb
283283
$(call cmd,dt_S_dtb)
284284

285+
DTS_OVERLAY ?= $(PROJECT_BASE)/$(BOARD_NAME).overlay
286+
285287
quiet_cmd_dtc = DTC $@
286288
cmd_dtc = echo '\#include "$(notdir $<)"' > dts/$(ARCH)/$(notdir $<)_pre_compiled ; \
287-
if test -e $(PROJECT_BASE)/$(BOARD_NAME).overlay; then \
289+
if test -e $(DTS_OVERLAY); then \
288290
echo '\#include "$(BOARD_NAME).overlay"' >> dts/$(ARCH)/$(notdir $<)_pre_compiled ; \
289291
fi ; \
290292
$(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
296298
$(obj)/%.dtb: $(src)/%.dts FORCE
297299
$(call if_changed_dep,dtc)
298300

299-
$(obj)/%.dts_compiled: $(src)/%.dts FORCE
301+
$(obj)/%.dts_compiled: $(src)/%.dts $(DTS_OVERLAY) FORCE
300302
$(call if_changed_dep,dtc)
301303

302304
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)

0 commit comments

Comments
 (0)