+ifdef USE_GIT_SRC_CHECKOUT
+ define Build/Prepare/Default
+ mkdir -p $(PKG_BUILD_DIR)
+ ln -s $(TOPDIR)/src-checkout/$(PKG_NAME)/.git $(PKG_BUILD_DIR)/.git
+ ( 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