From 8e8d530779cfd6778f641fedc17e5fe2fb9fcc61 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Sun, 21 Apr 2024 16:10:18 +0200 Subject: [PATCH] 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 --- py/mkrules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/mkrules.mk b/py/mkrules.mk index 5050935873..0dc1cdfe15 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