aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2024-03-08 16:26:53 +0000
committerChris Kay <chris.kay@arm.com>2024-04-29 12:47:01 +0000
commit7b45352669e53ab8a9ccf54b5fa3dac33620018b (patch)
treec108c5a1d18821e685e4269d35497caa102b4bfb
parent758ccb802d4f2a5fe55ec936a21ad4ae8cbd7b4f (diff)
downloadtrusted-firmware-a-7b45352669e53ab8a9ccf54b5fa3dac33620018b.tar.gz
build: separate preprocessing from DTB compilation
This is a small change to separate preprocessing of device tree sources into their own build step as opposed to combining them. The impact of this is more on separation of concerns than anything tangible, but it's helpful to avoid doing more than necessary in a build rule. Change-Id: I770291bd9d9f627c93e82556a40f753bf27eef93 Signed-off-by: Chris Kay <chris.kay@arm.com>
-rw-r--r--make_helpers/build_macros.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index cfd46d9ef..cf4595cd3 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -644,12 +644,14 @@ $(eval DTSDEP := $(patsubst %.dtb,%.o.d,$(DOBJ)))
# Dependencies of the DT compilation on its pre-compiled DTS
$(eval DTBDEP := $(patsubst %.dtb,%.d,$(DOBJ)))
-$(DOBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | fdt_dirs
+$(DPRE): $(2) | fdt_dirs
$${ECHO} " CPP $$<"
$(eval DTBS := $(addprefix $(1)/,$(call SOURCES_TO_DTBS,$(2))))
$$(Q)$($(ARCH)-cpp) -E $$(TF_CFLAGS_$(ARCH)) $$(DTC_CPPFLAGS) -MT $(DTBS) -MMD -MF $(DTSDEP) -o $(DPRE) $$<
+
+$(DOBJ): $(DPRE) $(filter-out %.d,$(MAKEFILE_LIST)) | fdt_dirs
$${ECHO} " DTC $$<"
- $$(Q)$($(ARCH)-dtc) $$(DTC_FLAGS) -d $(DTBDEP) -o $$@ $(DPRE)
+ $$(Q)$($(ARCH)-dtc) $$(DTC_FLAGS) -d $(DTBDEP) -o $$@ $$<
-include $(DTBDEP)
-include $(DTSDEP)