mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-19 13:20:50 +00:00
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>
This commit is contained in:
parent
2ca6c285a0
commit
d532a663d0
@ -284,7 +284,11 @@ if(LIB_INSTALL_DIR)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt")
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt not found. Run `git submodule update --init` from the source tree to fetch the submodule contents.")
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/")
|
||||
message(FATAL_ERROR "${MBEDTLS_FRAMEWORK_DIR}/CMakeLists.txt not found (and does appear to be a git checkout). Run `git submodule update --init` from the source tree to fetch the submodule contents.")
|
||||
else ()
|
||||
message(FATAL_ERROR "${MBEDTLS_FRAMEWORK_DIR}/CMakeLists.txt not found (and does not appear to be a git checkout). Please ensure you have downloaded the right archive from the release page on GitHub.")
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(framework)
|
||||
|
||||
|
11
Makefile
11
Makefile
@ -6,11 +6,16 @@ ifneq (,$(filter-out lib library/%,$(or $(MAKECMDGOALS),all)))
|
||||
ifeq (,$(wildcard framework/exported.make))
|
||||
# Use the define keyword to get a multi-line message.
|
||||
# GNU make appends ". Stop.", so tweak the ending of our message accordingly.
|
||||
define error_message
|
||||
$(MBEDTLS_PATH)/framework/exported.make not found.
|
||||
Run `git submodule update --init` to fetch the submodule contents.
|
||||
ifeq (,$(wildcard .git))
|
||||
define error_message
|
||||
${MBEDTLS_FRAMEWORK_DIR}/CMakeLists.txt not found (and does appear to be a git checkout). Run `git submodule update --init` from the source tree to fetch the submodule contents.
|
||||
This is a fatal error
|
||||
endef
|
||||
else
|
||||
define error_message
|
||||
${MBEDTLS_FRAMEWORK_DIR}/CMakeLists.txt not found (and does not appear to be a git checkout). Please ensure you have downloaded the right archive from the release page on GitHub.
|
||||
endef
|
||||
endif
|
||||
$(error $(error_message))
|
||||
endif
|
||||
include framework/exported.make
|
||||
|
Loading…
x
Reference in New Issue
Block a user