include $(INCLUDE_DIR)/unpack.mk
include $(INCLUDE_DIR)/depends.mk
+ifneq ($(wildcard $(TOPDIR)/src-checkout/$(PKG_NAME)/.git),)
+ USE_GIT_SRC_CHECKOUT:=1
+ QUILT:=1
+endif
ifneq ($(if $(CONFIG_SRC_TREE_OVERRIDE),$(wildcard ./git-src)),)
USE_GIT_TREE:=1
QUILT:=1
endif
endif
+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
ifdef USE_GIT_TREE
define Build/Prepare/Default
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/DefaultTargets
- $(if $(USE_SOURCE_DIR)$(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+ $(if $(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
$(if $(DUMP),,$(Build/CoreTargets))
define Build/DefaultTargets