Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ define define_module =
git -C "$(build)/$($1_base_dir)" submodule sync && \
echo "INFO: Updating submodules (init and checkout)" && \
git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \
echo "INFO: Cleaning board-specific build directories to prevent stale artifacts" && \
rm -rf "$(build)/$(BOARD)" "$(build)/$($1_base_dir)/$(BOARD)" && \
echo "INFO: Recreating board directories" && \
mkdir -p "$(build)/$(BOARD)" "$(build)/$($1_base_dir)/$(BOARD)" && \
Comment on lines +448 to +451
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Makefile now removes and recreates board directories every time submodules are updated. This aggressive cleaning approach could cause issues if other build artifacts or files exist in these directories that shouldn't be removed. The cleaning happens unconditionally even when it may not be necessary (e.g., when submodules haven't actually changed). Consider making this cleaning conditional or documenting why this aggressive approach is needed.

Copilot uses AI. Check for mistakes.
echo "INFO: Updating .canary file with new repo info" && \
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@" ; \
fi
Expand Down
Loading