diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-04-25 11:52:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-04-27 15:19:19 +0200 |
commit | 6fa88be4868836e77b7472dcdde0aeb4f78f8203 (patch) | |
tree | 0a29b0627407c8ffa45d92983d38cc2204517da4 | |
parent | 41ab276fe4d6a18f7bf875b4727474104fc4e136 (diff) | |
download | upstream-6fa88be4868836e77b7472dcdde0aeb4f78f8203.tar.gz upstream-6fa88be4868836e77b7472dcdde0aeb4f78f8203.tar.bz2 upstream-6fa88be4868836e77b7472dcdde0aeb4f78f8203.zip |
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 <nbd@nbd.name>
-rw-r--r-- | include/package.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/package.mk b/include/package.mk index 78ea5d0ef8..9912c86d6b 100644 --- a/include/package.mk +++ b/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 |