diff --git a/include/package.mk b/include/package.mk index c68bd1065..cccf17437 100644 --- a/include/package.mk +++ b/include/package.mk @@ -32,7 +32,7 @@ ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),) define Build/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*") + $(if $(filter prepare,$(MAKECMDGOALS)),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),$(PKG_BUILD_DIR)/.dep_files, -and -not -path "/.*" -and -not -path "*/ipkg*")) endef endif endif