Improve submodule error messages for Github archives
This commit improves the error messages informing users that have
downloaded Github archives to instead download a release archive. This
is due to Github not supporting submodules within archives and no
trivial way for users to use git to download them.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
diff --git a/Makefile b/Makefile
index 71ef1be..07eb556 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,19 @@
Run `git submodule update --init` to fetch the submodule contents.
This is a fatal error
endef
+ ifeq (,$(wildcard .git))
+ define error_message
+$(MBEDTLS_PATH)/.git/ not found.
+Please ensure you have downloaded a release version of Mbed TLS from GitHub.
+This is a fatal error
+ endef
+ else
+ define error_message
+$(MBEDTLS_PATH)/framework/exported.make not found.
+Run `git submodule update --init` to fetch the submodule contents.
+This is a fatal error
+ endef
+ endif
$(error $(error_message))
endif
include framework/exported.make