-
-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 ($(CONFIG_AUTOREBUILD),)
- define HostBuild/Autoclean
- $(PKG_BUILD_DIR)/.dep_files: $(STAMP_PREPARED)
- $(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(STAMP_PREPARED))
- $(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),$(PKG_BUILD_DIR)/.dep_files, -and -not -path "/.*" -and -not -path "*/ipkg*")
+ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
+ define HostHost/Autoclean
+ $(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(HOST_STAMP_PREPARED))
+ $(if $(if $(Host/Compile),$(filter prepare,$(MAKECMDGOALS)),1),,$(call rdep,$(HOST_BUILD_DIR),$(HOST_STAMP_BUILT)))