Skip to content

Commit

Permalink
py/mkrules.mk: Fix 'make submodules' when building out-of-tree.
Browse files Browse the repository at this point in the history
When MicroPython is used as a submodule and built from the containing
project, e.g. for the embed port, `make submodules` fails because it goes
looking for the sub-sub-module paths in the outer repository instead of in
the micropython repository. Fix this by invoking git inside the micropython
submodule.

Signed-off-by: Christian Walther <[email protected]>
  • Loading branch information
cwalther authored and dpgeorge committed Aug 26, 2024
1 parent 6c3dc0c commit 0b7f6e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/mkrules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ endif
submodules:
$(ECHO) "Updating submodules: $(GIT_SUBMODULES)"
ifneq ($(GIT_SUBMODULES),)
$(Q)git submodule sync $(addprefix $(TOP)/,$(GIT_SUBMODULES))
$(Q)git submodule update --init $(addprefix $(TOP)/,$(GIT_SUBMODULES))
$(Q)cd $(TOP) && git submodule sync $(GIT_SUBMODULES)
$(Q)cd $(TOP) && git submodule update --init $(GIT_SUBMODULES)
endif
.PHONY: submodules

Expand Down

0 comments on commit 0b7f6e1

Please sign in to comment.