STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)_installed
STAGING_FILES_LIST:=$(PKG_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),).list
+ifneq ($(if $(CONFIG_SRC_TREE_OVERRIDE),$(wildcard ./git-src)),)
+ USE_GIT_TREE:=1
+ QUILT:=1
+endif
include $(INCLUDE_DIR)/download.mk
include $(INCLUDE_DIR)/quilt.mk
SUBDIR:=$(PKG_SOURCE_SUBDIR)
PROTO:=$(PKG_SOURCE_PROTO)
$(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
+ $(if $(PKG_MIRROR_MD5SUM),MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM))
VERSION:=$(PKG_SOURCE_VERSION)
MD5SUM:=$(PKG_MD5SUM)
endef
+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 .)
+ endef
+endif
+
define Build/Exports/Default
$(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p))
$(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
+ $(1) : export CCACHE_DIR:=$(STAGING_DIR)/ccache
endef
Build/Exports=$(Build/Exports/Default)
define Build/DefaultTargets
$(if $(QUILT),$(Build/Quilt))
- $(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))
+ $(if $(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
$(call Build/Autoclean)
+ download:
+ $(foreach hook,$(Hooks/Download),
+ $(call $(hook))$(sep)
+ )
+
$(STAMP_PREPARED) : export PATH=$$(TARGET_PATH_PKG)
$(STAMP_PREPARED):
@-rm -rf $(PKG_BUILD_DIR)