diff --git a/unit_tests/Makefile b/unit_tests/Makefile index 7154f158fb..d163991924 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -3,6 +3,16 @@ # NOTE: Can be overridden externally. # + +ifeq ("$(wildcard googletest/LICENSE)","") +$(info Invoking "git submodule update --init") +$(shell git submodule update --init) +$(info Invoked "git submodule update --init") +# make is not happy about newly checked out module for some reason but next invocation would work +$(error Please run 'make' again. Please make sure you have 'git' command in PATH) +endif + + PROJECT_DIR = ../firmware # Compiler options here.