diff --git a/Makefile.cache b/Makefile.cache index 9491a2bfcc5e..b1e5903a60b7 100644 --- a/Makefile.cache +++ b/Makefile.cache @@ -65,8 +65,8 @@ # Common files and FLAGS -# Run the 'touch nocommon' command in the base directory to exclude the common files from caching -SONIC_COMMON_FILES_LIST := $(if $(wildcard nocommon),, .platform slave.mk rules/functions Makefile.cache) +# Run the 'touch cache.skip.common' command in the base directory to exclude the common files from caching +SONIC_COMMON_FILES_LIST := $(if $(wildcard cache.skip.common),, .platform slave.mk rules/functions Makefile.cache) SONIC_COMMON_FLAGS_LIST := $(CONFIGURED_PLATFORM) \ $(SONIC_DPKG_CACHE_SOURCE) $(SONIC_DEBUGGING_ON) \ $(SONIC_PROFILING_ON) $(SONIC_SANITIZER_ON) @@ -128,7 +128,7 @@ define MOD_LOCK chmod 777 $(2)/$(1)_$(3).lock; fi $(eval $(1)_lock_fd=$(subst ~,_,$(subst -,_,$(subst +,_,$(subst .,_,$(1)))))) - exec {$($(1)_lock_fd)}<"$(2)/$(1)_$(3).lock"; + exec {$($(1)_lock_fd)}<>"$(2)/$(1)_$(3).lock"; if ! flock -x -w $(4) "$${$($(1)_lock_fd)}" ; then echo "ERROR: Lock timeout trying to access $(2)/$(1)_$(3).lock"; exit 1; @@ -218,7 +218,7 @@ define LOAD_FROM_CACHE # Form the cache file name $(eval $(1)_MOD_CACHE_FILE := $(1)-$($(1)_DEP_MOD_SHA)-$($(1)_MOD_HASH).tgz) - $(if $(MDEBUG), $(info MODE_CACHE_FILE := $($(1)_MOD_CACHE_FILE))) + $(if $(MDEBUG), $(info $(1)_MODE_CACHE_FILE := $($(1)_MOD_CACHE_FILE))) # Retrive and log files list that are modified for the target. $(call GET_MODIFIED_FILES,$(1)) diff --git a/platform/broadcom/libsaithrift-dev.dep b/platform/broadcom/libsaithrift-dev.dep index ed550b6336e3..2ae0106247e4 100644 --- a/platform/broadcom/libsaithrift-dev.dep +++ b/platform/broadcom/libsaithrift-dev.dep @@ -3,7 +3,7 @@ SPATH := $($(LIBSAITHRIFT_DEV)_SRC_PATH) DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/libsaithrift-dev.mk platform/broadcom/libsaithrift-dev.dep DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) SMDEP_PATHS := $(SPATH) $(SPATH)/bm/behavioral-model $(SPATH)/test/ptf $(SPATH)/test/saithrift/ctypesgen -$(foreach path, $(SMDEP_PATHS), $(eval $(path) :=$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/, $(shell cd $(path) && git ls-files))))) +$(foreach path, $(SMDEP_PATHS), $(eval $(path) :=$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/, $(shell cd $(path) && git ls-files | grep -Ev " " ))))) $(LIBSAITHRIFT_DEV)_CACHE_MODE := GIT_CONTENT_SHA $(LIBSAITHRIFT_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) diff --git a/rules/docker-sonic-mgmt-spytest.dep b/rules/docker-sonic-mgmt-spytest.dep new file mode 100644 index 000000000000..26daffbd1afc --- /dev/null +++ b/rules/docker-sonic-mgmt-spytest.dep @@ -0,0 +1,11 @@ + +DPATH := $($(DOCKER_MGMT_SPYTEST)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-sonic-mgmt-spytest.mk rules/docker-sonic-mgmt-spytest.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) + +$(DOCKER_MGMT_SPYTEST)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_MGMT_SPYTEST)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_MGMT_SPYTEST)_DEP_FILES := $(DEP_FILES) + +$(eval $(call add_dbg_docker,$(DOCKER_MGMT_SPYTEST),$(DOCKER_MGMT_FRAMEWORK_DBG))) diff --git a/rules/sonic-thermalctld.dep b/rules/sonic-thermalctld.dep new file mode 100644 index 000000000000..6faa53b378e6 --- /dev/null +++ b/rules/sonic-thermalctld.dep @@ -0,0 +1,12 @@ + +SPATH := $($(SONIC_THERMALCTLD)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-thermalctld.mk rules/sonic-thermalctld.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_THERMALCTLD)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_THERMALCTLD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_THERMALCTLD)_DEP_FILES := $(DEP_FILES) +$(SONIC_THERMALCTLD)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_THERMALCTLD)_SMDEP_PATHS := $(SPATH) +