-
-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)
-
- $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
+ define HostBuild/Autoclean
+ $(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(STAMP_PREPARED))
+ $(if $(if $(Build/Compile),$(filter prepare,$(MAKECMDGOALS)),1),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT)))
+ endef