[coreboot-gerrit] New patch to review for coreboot: 161b3dc build system: generalize src-to-obj

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Mar 30 12:12:37 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9161

-gerrit

commit 161b3dc4e8d5005a738eaa3c56697b9c30f32ec2
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Fri Mar 27 16:56:23 2015 +0100

    build system: generalize src-to-obj
    
    It can now be used on any list of files instead of assuming
    to work on $($(class)-src).
    
    This is inspired by the commit listed below, but rewritten to match
    upstream, and split in smaller pieces to keep intent clear.
    
    Change-Id: Ib77afedd4c3f847963497beea503f5447a7c6e28
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
    Based-On-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 0cc9b6a..c5cbda1 100644
--- a/Makefile
+++ b/Makefile
@@ -203,8 +203,8 @@ endif
 # Eliminate duplicate mentions of source files in a class
 $(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))))
+src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $(2))))
+$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class),$($(class)-srcs))))
 
 # Save all objs before processing them (for dependency inclusion)
 originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))



More information about the coreboot-gerrit mailing list