8000 esp32: Fix component manager issue with "make submodules" by projectgus · Pull Request #16581 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

esp32: Fix component manager issue with "make submodules" #16581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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: 2 additions & 2 deletions ports/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ size-files:
# output and passes the list of submodules to py/mkrules.mk which does the
# `git submodule init` on each.
submodules:
@GIT_SUBMODULES=$$(idf.py $(IDFPY_FLAGS) -B $(BUILD)/submodules -D ECHO_SUBMODULES=1 build 2>&1 | \
@GIT_SUBMODULES=$$(IDF_COMPONENT_MANAGER=0 idf.py $(IDFPY_FLAGS) -B $(BUILD)/submodules -D ECHO_SUBMODULES=1 build 2>&1 | \
grep '^GIT_SUBMODULES=' | cut -d= -f2); \
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$${GIT_SUBMODULES}" submodules
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$${GIT_SUBMODULES}" GIT_SUBMODULES_FAIL_IF_EMPTY=1 submodules
2 changes: 1 addition & 1 deletion ports/esp32/esp32_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ list(APPEND MICROPY_SOURCE_DRIVERS
)

string(CONCAT GIT_SUBMODULES "${GIT_SUBMODULES} " lib/tinyusb)
if(MICROPY_PY_TINYUSB)
if(MICROPY_PY_TINYUSB AND NOT ECHO_SUBMODULES)
set(TINYUSB_SRC "${MICROPY_DIR}/lib/tinyusb/src")
string(TOUPPER OPT_MCU_${IDF_TARGET} tusb_mcu)

Expand Down
2 changes: 1 addition & 1 deletion ports/rp2/Makefile
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ submodules:
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="lib/pico-sdk" submodules
@GIT_SUBMODULES=$$(cmake -B $(BUILD)/submodules -DECHO_SUBMODULES=1 ${CMAKE_ARGS} -S . 2>&1 | \
grep '^GIT_SUBMODULES=' | cut -d= -f2); \
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$${GIT_SUBMODULES}" submodules
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$${GIT_SUBMODULES}" GIT_SUBMODULES_FAIL_IF_EMPTY=1 submodules
7 changes: 7 additions & 0 deletions py/mkrules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ ifneq ($(GIT_SUBMODULES),)
# Fallback to standard submodule update if blobless isn't available (earlier than 2.36.0)
$(Q)cd $(TOP) && git submodule update --init --filter=blob:none $(GIT_SUBMODULES) || \
git submodule update --init $(GIT_SUBMODULES)
else
ifeq ($(GIT_SUBMODULES_FAIL_IF_EMPTY),1)
# If you see this error, it may mean the internal step run by the port's build
# system to find git submodules has failed. Double-check dependencies are set correctly.
$(ECHO) "Internal build error: The submodule list should not be empty."
exit 1
endif
endif
.PHONY: submodules

Expand Down
Loading
0