aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.inc
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2014-12-05 12:32:09 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-17 09:55:31 +0200
commitf97b88bee8f65e3d7d73a5eede632d027b6a08a6 (patch)
treeb3d8d22dc3493f92ac7155c4583ade44a5cf6ead /Makefile.inc
parent16d01886799796fe8abb3c4bc49e13eb27b1cec8 (diff)
downloadcoreboot-f97b88bee8f65e3d7d73a5eede632d027b6a08a6.tar.gz
coreboot-f97b88bee8f65e3d7d73a5eede632d027b6a08a6.tar.xz
coreboot-f97b88bee8f65e3d7d73a5eede632d027b6a08a6.zip
Makefile: Fix dependency tracking for ramstage objects
Dependency tracking in incremental builds is currently broken for the ramstage, due to the intermediate linking step into one ramstage.o file per directory. The original xxx.ramstage.o files are removed from ramstage-objs, so they don't end up in allobjs and won't get translated into DEPENDENCIES. This patch explicitly adds them to DEPENDENCIES beforehand to resolve the issue. BRANCH=None BUG=None TEST=Built, ran 'touch src/include/cbmem.h' and built again incrementally. Confirmed that objects dependent on the modified header such as timestamp.ramstage.o get rebuilt correctly. Change-Id: I3ba411e4073b38e038445aadceeccfe6c09670c8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 9c57d6a8421a109ee3e87567c9add579f9ae761e Original-Change-Id: Ife529ad8f5c011456c1e0c380356f1b1bb5047cb Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/233571 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9745 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 9c043c482..204e5185a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -112,7 +112,8 @@ files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(sor
#######################################################################
# reduce command line length by linking the objects of each
# directory into an intermediate file
-ramstage-postprocess=$(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
+ramstage-postprocess=$$(eval DEPENDENCIES+=$$(addsuffix .d,$$(basename $(1)))) \
+ $(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
$(eval $(d)ramstage.o: $(call files-in-dir,$(d),$(filter-out %.ld,$(1))); $$(LD_ramstage) -o $$@ -r $$^ ) \
$(eval ramstage-objs:=$(d)ramstage.o $(filter-out $(filter-out %.ld, $(call files-in-dir,$(d),$(1))),$(ramstage-objs))))