add auto-rebuild for host builds (tested with tools/ and toolchain/)

SVN-Revision: 6361
This commit is contained in:
Felix Fietkau 2007-02-25 18:28:25 +00:00
parent 653f61fb3e
commit b04f09245d

View File

@ -73,6 +73,15 @@ ifneq ($(strip $(PKG_SOURCE)),)
endif endif
define HostBuild 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: $(PKG_BUILD_DIR)/.prepared:
@-rm -rf $(PKG_BUILD_DIR) @-rm -rf $(PKG_BUILD_DIR)
@mkdir -p $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR)
@ -92,7 +101,7 @@ define HostBuild
touch $$@ touch $$@
ifdef Build/Install ifdef Build/Install
install-targets: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed install: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed
endif endif
package-clean: FORCE package-clean: FORCE
@ -103,16 +112,9 @@ define HostBuild
download: download:
prepare: $(PKG_BUILD_DIR)/.prepared prepare: $(PKG_BUILD_DIR)/.prepared
configure: $(PKG_BUILD_DIR)/.configured configure: $(PKG_BUILD_DIR)/.configured
compile: $(PKG_BUILD_DIR)/.built
compile-targets: $(PKG_BUILD_DIR)/.built install:
compile: compile-targets
install-targets:
install: install-targets
clean-targets:
clean: FORCE clean: FORCE
@$(MAKE) clean-targets
$(call Build/Clean) $(call Build/Clean)
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR)