build: support submodule update during config

This patch adds support to update git submodules during config
phase of RMM build. Doing this within the RMM build phase means
that if there is any update of the dependency after rebase of
project, this will be catered for transparently during build.

Also, typical `git clone` command for projects with submodules
usually specify `recursive` option which then recursively
downloads the dependencies of submodules. This is a problem
when `libspdm` is included as a dependency for RMM as it has
several dependant submodules of its own and is not required
in the RMM context. So, having the RMM build system update the
submodule avoids this problem.

This also ties in with the `git patch` apply logic in RMM. The
patch application assumes a commit SHA for the dependency. With
this framework, the commit SHA can be ensured before the patch
is applied.

The submodule update is specified as shallow clone of the git
repositories to make the operation efficient.

The userguide is also updated for instructions to clone the
project.

Change-Id: Id73243e88df762eaee391d646731ec08a3e2aa4f
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
diff --git a/cmake/CommonConfigs.cmake b/cmake/CommonConfigs.cmake
index d34f2b9..7a33e92 100644
--- a/cmake/CommonConfigs.cmake
+++ b/cmake/CommonConfigs.cmake
@@ -126,15 +126,7 @@
 #
 # Get git commit information
 #
-find_package(Git)
-if(GIT_FOUND)
-  execute_process(
-    COMMAND ${GIT_EXECUTABLE} describe --always --dirty --tags
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-    OUTPUT_VARIABLE COMMIT_INFO
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-endif()
+Git_Get_Commit_Info(COMMIT_INFO)
 
 target_compile_definitions(rmm-common
     INTERFACE "COMMIT_INFO=\"${COMMIT_INFO}\"")