diff --git a/Makefile.cache b/Makefile.cache index 50fac768a5..9b6d617578 100644 --- a/Makefile.cache +++ b/Makefile.cache @@ -561,6 +561,12 @@ define SHA_DEP_RULES ALL_DEP_FILES_LIST += $(foreach pkg,$(2), $($(filter none,$($(1)_CACHE_MODE)), \ $(addsuffix .$(3),$(addprefix $(pkg)/, $(1))) \ $(addsuffix .$(3).sha,$(addprefix $(pkg)/, $(1))))) +$(foreach docker, $(filter $(SONIC_DOCKER_IMAGES), $(1)), \ + $(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \ + $(wildcard files/build/versions/dockers/$(basename $(docker))/*))) +$(foreach docker, $(filter $(SONIC_DOCKER_DBG_IMAGES), $(1)), \ + $(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \ + $(wildcard files/build/versions/dockers/$(patsubst %-$(DBG_IMAGE_MARK).gz,%,$(docker))/*))) $(addsuffix .$(3),$(addprefix $(2)/, $(1))) : $(2)/%.$(3) : \ $(2)/%.flags $$$$($$$$*_DEP_FILES) $$$$(if $$$$($$$$*_SMDEP_FILES), $(2)/%.smdep) @$$(eval $$*_DEP_FILES_MODIFIED := $$? )