mirror of
https://github.com/linuxboot/heads.git
synced 2025-04-10 12:50:09 +00:00
Makefile: When cloning a repo from Git, update submodules correctly
When cloning a repo from Git, actually change to the repo directory to check out the submodules as well. Without the -C <dir>, the submodule checkout happened in the Heads repo itself, which has no submodules. This is important for coreboot being built in CI. Without this, the coreboot submodules will be checked out automatically by the coreboot build system during the build, meaning they will not be in the prepped module cache. A trade-off though is that at this point, we don't know what submodules are actually needed - we will clone some that are not needed. coreboot knows to skip some submodules during the build if they are not needed. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
0b494fea09
commit
a2876a26a1
2
Makefile
2
Makefile
@ -392,7 +392,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 submodule update --init --checkout; \
|
||||
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && git -C "$(build)/$($1_base_dir)" submodule update --init --checkout; \
|
||||
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)" && \
|
||||
|
Loading…
x
Reference in New Issue
Block a user