diff --git a/platform/broadcom/sai.dep b/platform/broadcom/sai.dep index 11cc72b192fb..21455ca54673 100644 --- a/platform/broadcom/sai.dep +++ b/platform/broadcom/sai.dep @@ -3,12 +3,16 @@ SPATH := $($(BRCM_SAI)_SRC_PATH) DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/sai.mk platform/broadcom/sai.dep DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +# Get the Latest HTTP Header and calculate the SHA value as it is a softlink that always points to LATEST_INT_OCP_SAI_X.X.X +SAI_FLAGS := $(shell wget --spider --server-response $($(BRCM_SAI)_URL) $($(BRCM_SAI_DEV)_URL) 2>&1 \ + | grep -Ev -- '--|Date:'|sha256sum|awk '{print $$1}' ) $(BRCM_SAI)_CACHE_MODE := GIT_CONTENT_SHA -$(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS) $(BRCM_SAI)_DEP_FILES := $(DEP_FILES) + $(BRCM_SAI_DEV)_CACHE_MODE := GIT_CONTENT_SHA -$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS) $(BRCM_SAI_DEV)_DEP_FILES := $(DEP_FILES)