From 963bed546f316af15bf1e4d1819388b8998ef5ec Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 15 May 2013 11:47:51 +0200 Subject: 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 Date: Sun Nov 25 14:31:08 2012 +0100 build system: Add hook to postprocess classes (object lists) and: commit f33e395213f0516a9256f33ede4c6bba3babb0e9 Author: Patrick Georgi Date: Sun Nov 25 17:10:47 2012 +0100 build system: Split linking into multiple steps Change-Id: If93b1773c5d53240f98382aab11bf7f5a4649ee8 Signed-off-by: Nico Huber Reviewed-on: http://review.coreboot.org/3258 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') 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: -- cgit v1.2.3