summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc2
-rw-r--r--tests/Makefile.inc3
2 files changed, 2 insertions, 3 deletions
diff --git a/Makefile.inc b/Makefile.inc
index a372efaedc75..ce70a30c0fd6 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -193,6 +193,8 @@ 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))
+# Checkout Cmocka repository
+forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/cmocka))
ifeq ($(CONFIG_USE_BLOBS),y)
# These items are necessary because each has update=none in .gitmodules. They are ignored
# until expressly requested and enabled with --checkout
diff --git a/tests/Makefile.inc b/tests/Makefile.inc
index 48bd18b2baec..fd3cd9f8d188 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.inc
@@ -41,9 +41,6 @@ TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin
TEST_CFLAGS += -D__TEST__
-# Checkout Cmocka repository
-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/cmocka)
-
TEST_CFLAGS += -I$(cmockasrc)/include
# Link against Cmocka