Skip to content

Commit

Permalink
Make all build results depend on all makefiles
Browse files Browse the repository at this point in the history
This makes incremental builds work when the only change is to a definition
in a makefile. This version of the patch has been fixed to avoid depending
on the dependency makefiles that are generated at build time.

Fixes ARM-software/tf-issues#551

Signed-off-by: Stephen Warren <[email protected]>
  • Loading branch information
nvswarren committed Mar 1, 2018
1 parent 4504ab2 commit 6bc1a30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions make_helpers/build_macros.mk
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ $(eval OBJ := $(1)/$(patsubst %.c,%.o,$(notdir $(2))))
$(eval DEP := $(patsubst %.o,%.d,$(OBJ)))
$(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))

$(OBJ): $(2) | bl$(3)_dirs
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | bl$(3)_dirs
@echo " CC $$<"
$$(Q)$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -D$(IMAGE) $(MAKE_DEP) -c $$< -o $$@

Expand All @@ -218,7 +218,7 @@ $(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2))))
$(eval DEP := $(patsubst %.o,%.d,$(OBJ)))
$(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))

$(OBJ): $(2) | bl$(3)_dirs
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | bl$(3)_dirs
@echo " AS $$<"
$$(Q)$$(AS) $$(ASFLAGS) -D$(IMAGE) $(MAKE_DEP) -c $$< -o $$@

Expand All @@ -235,7 +235,7 @@ define MAKE_LD

$(eval DEP := $(1).d)

$(1): $(2) | bl$(3)_dirs
$(1): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | bl$(3)_dirs
@echo " PP $$<"
$$(Q)$$(CPP) $$(CPPFLAGS) -P -D__ASSEMBLY__ -D__LINKER__ $(MAKE_DEP) -o $$@ $$<

Expand Down Expand Up @@ -374,7 +374,7 @@ define MAKE_DTB
$(eval DOBJ := $(addprefix $(1)/,$(call SOURCES_TO_DTBS,$(2))))
$(eval DEP := $(patsubst %.dtb,%.d,$(DOBJ)))

$(DOBJ): $(2) | fdt_dirs
$(DOBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | fdt_dirs
@echo " DTC $$<"
$$(Q)$$(DTC) $$(DTC_FLAGS) -d $(DEP) -o $$@ $$<

Expand Down

0 comments on commit 6bc1a30

Please sign in to comment.