Quellcode durchsuchen

build: add support for git submodules with CONFIG_SRC_TREE_OVERRIDE

Also work around an issue where git would store the modified workdir in
the submodule git config files

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau vor 7 Jahren
Ursprung
Commit
6fa88be486
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      include/package.mk

+ 6 - 1
include/package.mk

@@ -120,7 +120,12 @@ ifdef USE_GIT_TREE
   define Build/Prepare/Default
 	mkdir -p $(PKG_BUILD_DIR)
 	ln -s $(CURDIR)/git-src $(PKG_BUILD_DIR)/.git
-	( cd $(PKG_BUILD_DIR); git checkout .)
+	( cd $(PKG_BUILD_DIR); \
+		git checkout .; \
+		git submodule update --recursive; \
+		git submodule foreach git config --unset core.worktree; \
+		git submodule foreach git checkout .; \
+	)
   endef
 endif
 ifdef USE_SOURCE_DIR