X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=include%2Fhost-build.mk;h=5622e987079711d3f3e38a2db17db5375f1eeec9;hb=26f6351004554e84839259124a6a0ccd93d5d5da;hp=47ec9b0d3a5845a88ab53f6ad2a539e023594cb6;hpb=12c49b6a6adbbcb0c7a19119c8a8c94b5f025f79;p=openwrt-10.03%2F.git diff --git a/include/host-build.mk b/include/host-build.mk index 47ec9b0d3..5622e9870 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2007 OpenWrt.org +# Copyright (C) 2006-2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -12,13 +12,14 @@ include $(INCLUDE_DIR)/host.mk include $(INCLUDE_DIR)/unpack.mk include $(INCLUDE_DIR)/depends.mk -STAMP_PREPARED:=$(PKG_BUILD_DIR)/.prepared_$(shell find ${CURDIR} $(PKG_FILE_DEPEND) $(DEP_FINDPARAMS) | md5s) +STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),))) STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured STAMP_BUILT:=$(PKG_BUILD_DIR)/.built STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed override MAKEFLAGS= +include $(INCLUDE_DIR)/download.mk include $(INCLUDE_DIR)/quilt.mk Build/Patch:=$(Build/Patch/Default) @@ -26,6 +27,7 @@ ifneq ($(strip $(PKG_UNPACK)),) define Build/Prepare/Default $(PKG_UNPACK) $(Build/Patch) + $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used) endef endif @@ -69,29 +71,26 @@ define Build/Compile $(call Build/Compile/Default) endef - -ifneq ($(strip $(PKG_SOURCE)),) - download: $(DL_DIR)/$(PKG_SOURCE) - - $(DL_DIR)/$(PKG_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) - - $(STAMP_PREPARED): $(DL_DIR)/$(PKG_SOURCE) -endif - ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),) define HostBuild/Autoclean - $(PKG_BUILD_DIR)/.dep_files: $(STAMP_PREPARED) $(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(STAMP_PREPARED)) - $(if $(if $(Build/Compile),$(filter prepare,$(MAKECMDGOALS)),1),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),$(PKG_BUILD_DIR)/.dep_files, -and -not -path "/.*" -and -not -path "*/ipkg*")) + $(if $(if $(Build/Compile),$(filter prepare,$(MAKECMDGOALS)),1),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT))) endef endif +define Download/default + FILE:=$(PKG_SOURCE) + URL:=$(PKG_SOURCE_URL) + PROTO:=$(PKG_SOURCE_PROTO) + SUBDIR:=$(PKG_SOURCE_SUBDIR) + VERSION:=$(PKG_SOURCE_VERSION) + MD5SUM:=$(PKG_MD5SUM) +endef + define HostBuild - ifeq ($(DUMP),) - $(call HostBuild/Autoclean) - endif + $(if $(QUILT),$(Build/Quilt)) + $(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)) + $(if $(DUMP),,$(call HostBuild/Autoclean)) $(STAMP_PREPARED): @-rm -rf $(PKG_BUILD_DIR)