summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2013-05-15 11:47:51 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2013-05-20 10:28:25 +0200
commit963bed546f316af15bf1e4d1819388b8998ef5ec (patch)
treea464440d100b875571e6527f1a132443d0356e16 /Makefile
parentb0fb2234be259a32325f5fc28750bd7b8aebc708 (diff)
Make: Use unaltered object list for dependency inclusion
It looks like the inclusion of dependency files was broken for all ramstage objects since the list of those gets processed through the ramstage-postprocess macro. Fix that by taking the unaltered list for dependency files. The output of `make printall` (look for DEPENDENCIES=) shows which dependency files will be included. See also: commit 79f9010e80a04f2e0fb0cca5759e3215dff79aff Author: Patrick Georgi <patrick@georgi-clan.de> Date: Sun Nov 25 14:31:08 2012 +0100 build system: Add hook to postprocess classes (object lists) and: commit f33e395213f0516a9256f33ede4c6bba3babb0e9 Author: Patrick Georgi <patrick@georgi-clan.de> Date: Sun Nov 25 17:10:47 2012 +0100 build system: Split linking into multiple steps Change-Id: If93b1773c5d53240f98382aab11bf7f5a4649ee8 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/3258 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9aafe7cd6c..dec32e5dc2 100644
--- a/Makefile
+++ b/Makefile
@@ -242,6 +242,9 @@ $(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs))))
$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class))))
+# Save all objs before processing them (for dependency inclusion)
+originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
+
# Call post-processors if they're defined
$(foreach class,$(classes),\
$(if $(value $(class)-postprocess),$(eval $(call $(class)-postprocess,$($(class)-objs)))))
@@ -273,7 +276,7 @@ $(foreach class,$(classes), \
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file))))))
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
-DEPENDENCIES = $(allobjs:.o=.d)
+DEPENDENCIES = $(originalobjs:.o=.d)
-include $(DEPENDENCIES)
printall: