summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-04-19 20:15:16 -0600
committerMartin Roth <martinroth@google.com>2016-04-19 18:24:10 +0200
commit3812597c668b795d4fc85578021e501f2a56f6b9 (patch)
treeae4c82017eb4dc110ec319a6334bac307103c59e /Makefile.inc
parent88e83e580d0a95058be474014fb4f4e0be28d169 (diff)
downloadcoreboot-3812597c668b795d4fc85578021e501f2a56f6b9.tar.xz
Makefile.inc: Stop running git repeatedly for each build
Currently, the coreboot makefiles repeatedly run git to try to set the KERNELVERSION variable and to fetch the submodules. This happens three times for every build. By exporting a variable, we can catch this on recursive makes and not run each of these steps again. Change-Id: I85ab867b40e80c36bd94d48510ffe3252c6cf93f Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14392 Tested-by: build bot (Jenkins) Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 0a3b92c06b..02ea674f12 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -22,6 +22,7 @@ CONFIG_FMDFILE:=$(call strip_quotes,$(CONFIG_FMDFILE))
#######################################################################
# misleadingly named, this is the coreboot version
+ifeq ($(KERNELVERSION),)
ifeq ($(BUILD_TIMELESS),1)
export KERNELVERSION := TIMELESS
else
@@ -31,6 +32,7 @@ export KERNELVERSION := $(strip $(if $(GIT),\
$(shell cat $(top)/.coreboot-version),\
coreboot-unknown$(KERNELREVISION))))
endif
+endif
#######################################################################
# Basic component discovery
@@ -174,6 +176,7 @@ ifeq ($(CONFIG_COVERAGE),y)
ramstage-c-ccopts += -fprofile-arcs -ftest-coverage
endif
+ifneq ($(UPDATED_SUBMODULES),1)
# try to fetch non-optional submodules if the source is under git
forgetthis:=$(if $(GIT),$(shell git submodule update --init))
ifeq ($(CONFIG_USE_BLOBS),y)
@@ -181,6 +184,8 @@ ifeq ($(CONFIG_USE_BLOBS),y)
# unless explicitly requested and enabled through --checkout
forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/blobs))
endif
+export UPDATED_SUBMODULES:=1
+endif
ramstage-c-deps:=$$(OPTION_TABLE_H)
romstage-c-deps:=$$(OPTION_TABLE_H)