summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Walther <cwalther@gmx.ch>2024-04-21 16:10:18 +0200
committerDamien George <damien.p.george@gmail.com>2024-08-26 12:30:24 +1000
commit0b7f6e1d3d57036aaeb082bdc685310a42dd6cb0 (patch)
tree77b2bd8b960c66e624c5edf9319a3770d8f78be1
parent6c3dc0c0b09701b83a957368220d9c8bfe40af0a (diff)
py/mkrules.mk: Fix 'make submodules' when building out-of-tree.
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 <cwalther@gmx.ch>
-rw-r--r--py/mkrules.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk
index 505093587..0dc1cdfe1 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -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