X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=include%2Fhost-build.mk;h=ea7cd3acafd55782b092f5731b601936c43e3c93;hb=e90cdd3990f76ee8561d98e49ef2719fa5311489;hp=9a5a41317efcb5e649a1fa111ab953a1157cca5a;hpb=65aeed311cbddeb66427150582239ff1623246d9;p=openwrt-10.03%2F.git diff --git a/include/host-build.mk b/include/host-build.mk index 9a5a41317..ea7cd3aca 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -4,14 +4,13 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -ifneq ($(strip $(PKG_CAT)),) - ifeq ($(PKG_CAT),unzip) - UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) - else - UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - - endif + +include $(INCLUDE_DIR)/host.mk +include $(INCLUDE_DIR)/unpack.mk + +ifneq ($(strip $(PKG_UNPACK)),) define Build/Prepare/Default - $(UNPACK) + $(PKG_UNPACK) @if [ -d ./patches ]; then \ $(PATCH) $(PKG_BUILD_DIR) ./patches; \ fi @@ -74,6 +73,15 @@ ifneq ($(strip $(PKG_SOURCE)),) endif define HostBuild + ifeq ($(DUMP),) + ifeq ($(CONFIG_AUTOREBUILD),y) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(PKG_FILE_DEPEND)),$(PKG_BUILD_DIR)) + $$(info Forcing package rebuild) + $(PKG_BUILD_DIR)/.prepared: package-clean + endif + endif + endif + $(PKG_BUILD_DIR)/.prepared: @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) @@ -90,10 +98,11 @@ define HostBuild $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built $(call Build/Install) + mkdir -p $$(shell dirname $$@) touch $$@ ifdef Build/Install - install-targets: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed + install: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed endif package-clean: FORCE @@ -104,16 +113,9 @@ define HostBuild download: prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured - - compile-targets: $(PKG_BUILD_DIR)/.built - compile: compile-targets - - install-targets: - install: install-targets - - clean-targets: + compile: $(PKG_BUILD_DIR)/.built + install: clean: FORCE - @$(MAKE) clean-targets $(call Build/Clean) rm -rf $(PKG_BUILD_DIR)