[coreboot-gerrit] New patch to review for coreboot: 51ff374 make: improve building out of tree

Vadim Bendebury (vbendeb@chromium.org) gerrit at coreboot.org
Mon May 4 06:34:41 CEST 2015


Vadim Bendebury (vbendeb at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10087

-gerrit

commit 51ff374d534fe61d3668b4ccaddaae8f7d5d861f
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Sun Apr 26 18:39:37 2015 -0700

    make: improve building out of tree
    
    When trying to build out of tree and specifying a relative path to a
    directory somewhere above the source code root, make fails as follows:
    
    $ make obj=../build/peppy
    ...
    No rule to make target
    `<full_path_to>/build/peppy/mainboard/google/peppy/static.c',
    needed by
    `<full_path_to>/build/peppy/mainboard/google/peppy/static.romstage.o'.
    Stop
    
    Invoking make using the full path to the build directory works fine:
    
    $ make obj=<full_path_to>/build/peppy
    
    With the suggested change make proceeds much further with either way
    of specifying build directory location.
    
    It succeeds if obj= is specified as the full path, but still fails to
    build if it is specified as a relative path. The failure is different
    though - for some reason linker complaints about multiple definitions
    of certain names. That other failure will have to be investigated
    separately, this patch allows the build to go much further and should
    be merged on its own merits.
    
    Change-Id: I583a18d9bb52d2cfba818fb47931c6ccbc615256
    Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
---
 Makefile.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc b/Makefile.inc
index 6403977..46a93f8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -339,7 +339,8 @@ $(BIMGTOOL): $(top)/util/bimgtool/bimgtool.c
 #######################################################################
 # needed objects that every mainboard uses
 # Creation of these is architecture and mainboard independent
-$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb  $(objutil)/sconfig/sconfig
+$(abspath $(obj)/mainboard/$(MAINBOARDDIR)/static.c): \
+   $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb  $(objutil)/sconfig/sconfig
 	@printf "    SCONFIG    $(subst $(src)/,,$(<))\n"
 	mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
 	$(objutil)/sconfig/sconfig $(MAINBOARDDIR) $(obj)/mainboard/$(MAINBOARDDIR)



More information about the coreboot-gerrit mailing list