Makefile: Don't check out submodules when cloning a git module

Checking out submodules was much worse for coreboot, it has many
submodules and only a subset of them are actually used.  coreboot knows
to sync the needed submodules during its build.

Instead, just remove the errant command that did not actually work.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Jonathon Hall 2024-07-26 11:09:29 -04:00 committed by Thierry Laurion
parent a2876a26a1
commit 1e54152f30
No known key found for this signature in database
GPG Key ID: 9A53E1BB3FF00461

View File

@ -378,7 +378,9 @@ define define_module =
# First time:
# Checkout the tree instead and create the canary file with repo and
# revision so that we know that the files are all present and their
# version.
# version. Submodules are _not_ checked out, because coreboot has
# many submodules that won't be used, let coreboot check out its own
# submodules during build
#
# Other times:
# If .canary contains the same repo and revision combination, do nothing.
@ -392,7 +394,7 @@ define define_module =
$(build)/$($1_base_dir)/.canary: FORCE
if [ ! -e "$$@" ]; then \
git clone $($1_repo) "$(build)/$($1_base_dir)"; \
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && git -C "$(build)/$($1_base_dir)" submodule update --init --checkout; \
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash); \
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \
echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \