[coreboot-gerrit] Patch set updated for coreboot: 859a044 Only update submodules if the source is in a git repo

Martin Roth (gaumless@gmail.com) gerrit at coreboot.org
Wed Mar 4 04:36:34 CET 2015


Martin Roth (gaumless at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8427

-gerrit

commit 859a044c262d3d1c222cbf125664235ad8cc08c8
Author: Martin Roth <gaumless at gmail.com>
Date:   Thu Feb 12 19:34:11 2015 -0700

    Only update submodules if the source is in a git repo
    
    This change just adds a check to verify that the build is happening
    inside a git repo and that git is a valid command before trying
    to update the submodules.
    
    Change-Id: Idfa27645c3dbfd684f90002ecb01626d71eacc8f
    Signed-off-by: Martin Roth <gaumless at gmail.com>
---
 Makefile.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index a60df87..b8ab4be 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -19,7 +19,7 @@
 
 #######################################################################
 # misleadingly named, this is the coreboot version
-export KERNELVERSION := $(shell if [ -d "$(top)/.git" -a -f "`which git`" ]; \
+export KERNELVERSION := $(shell if [ -d "$(top)/.git" -a -f "$(command -v git)" ]; \
        then git describe --dirty --always || git describe; \
        else echo 4.0$(KERNELREVISION); fi)
 
@@ -139,12 +139,14 @@ ifeq ($(CONFIG_COVERAGE),y)
 ramstage-c-ccopts+=-fprofile-arcs -ftest-coverage
 endif
 
-# try to fetch non-optional submodules
-forgetthis:=$(shell git submodule update --init)
+# try to fetch non-optional submodules if the source is under git
+forgetthis:=$(shell if [ -d "$(top)/.git" -a -f "$(command -v git)" ]; \
+	then git submodule update --init; fi)
 ifeq ($(CONFIG_USE_BLOBS),y)
 # this is necessary because 3rdparty is update=none, and so is ignored
 # unless explicitly requested and enabled through --checkout
-forgetthis:=$(shell git submodule update --init --checkout 3rdparty)
+forgetthis:=$(shell if [ -d "$(top)/.git" -a -f "$(command -v git)" ]; \
+	then git submodule update --init --checkout 3rdparty; fi)
 endif
 
 bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__



More information about the coreboot-gerrit mailing list