aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile.inc b/Makefile.inc
index a60df873c0..b8ab4bea77 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__