5c81c499e4
This is due to the fact that we use SONIC_OVERRIDE_BUILD_VARS internally in our build jobs and this is not accounted in caching framework. So we add MLNX_SDK_DEB_VERSION to force rebuild if we changed it via SONIC_OVERRIDE_BUILD_VARS. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
240 lines
8.7 KiB
Plaintext
240 lines
8.7 KiB
Plaintext
# DPKG FRK
|
|
|
|
# Append MLNX_SDK_DEB_VERSION to flags list.
|
|
# We use SONIC_OVERRIDE_BUILD_VARS in order to build SONiC with any SDK we want
|
|
# by passing it in environment variable. This approach does not work well with
|
|
# caching framework which assumes that if the corresponding makefile didn't change
|
|
# the version didn't change neither. There is no ultimate solution to support
|
|
# caching and anything user can pass in SONIC_OVERRIDE_BUILD_VARS, so as a W/A
|
|
# we append MLNX_SDK_DEB_VERSION to flags to invalidate cache in case we use
|
|
# SONIC_OVERRIDE_BUILD_VARS.
|
|
MLNX_SDK_COMMON_FLAGS_LIST = $(SONIC_COMMON_FLAGS_LIST) $(MLNX_SDK_DEB_VERSION)
|
|
|
|
# APPLIBS
|
|
|
|
SPATH := $($(APPLIBS)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(APPLIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(APPLIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(APPLIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(APPLIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(APPLIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(APPLIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(APPLIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(APPLIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(APPLIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# IPROUTE2_MLNX
|
|
|
|
SPATH := $($(IPROUTE2_MLNX)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(IPROUTE2_MLNX)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(IPROUTE2_MLNX)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(IPROUTE2_MLNX)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(IPROUTE2_MLNX_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(IPROUTE2_MLNX_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(IPROUTE2_MLNX_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(IPROUTE2_MLNX_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(IPROUTE2_MLNX_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(IPROUTE2_MLNX_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_COMPLIB
|
|
|
|
SPATH := $($(SX_COMPLIB)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SX_COMPLIB)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_COMPLIB)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_COMPLIB)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SX_COMPLIB_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_COMPLIB_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_COMPLIB_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SX_COMPLIB_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_COMPLIB_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_COMPLIB_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_EXAMPLES
|
|
|
|
SPATH := $($(SX_EXAMPLES)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SX_EXAMPLES)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_EXAMPLES)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_EXAMPLES)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SX_EXAMPLES_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_EXAMPLES_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_EXAMPLES_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SX_EXAMPLES_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_EXAMPLES_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_EXAMPLES_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_GEN_UTILS
|
|
|
|
SPATH := $($(SX_GEN_UTILS)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SX_GEN_UTILS)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_GEN_UTILS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_GEN_UTILS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SX_GEN_UTILS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_GEN_UTILS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_GEN_UTILS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SX_GEN_UTILS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_GEN_UTILS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_GEN_UTILS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_SCEW
|
|
|
|
SPATH := $($(SX_SCEW)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SX_SCEW)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_SCEW)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_SCEW)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SX_SCEW_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_SCEW_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_SCEW_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SX_SCEW_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_SCEW_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_SCEW_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SXD_LIBS
|
|
|
|
SPATH := $($(SXD_LIBS)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SXD_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SXD_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SXD_LIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SXD_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SXD_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SXD_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SXD_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SXD_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SXD_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# PYTHON_SDK_API
|
|
|
|
SPATH := $($(PYTHON_SDK_API)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(PYTHON_SDK_API)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(PYTHON_SDK_API)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(PYTHON_SDK_API)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(PYTHON_SDK_API_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(PYTHON_SDK_API_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(PYTHON_SDK_API_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_ACL_HELPER
|
|
|
|
SPATH := $($(SX_ACL_HELPER)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(SX_ACL_HELPER)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_ACL_HELPER)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_ACL_HELPER)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(SX_ACL_HELPER_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_ACL_HELPER_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_ACL_HELPER_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(SX_ACL_HELPER_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_ACL_HELPER_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_ACL_HELPER_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# WJH_LIBS
|
|
|
|
SPATH := $($(WJH_LIBS)_SRC_PATH)
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
$(WJH_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(WJH_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(WJH_LIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
$(WJH_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(WJH_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(WJH_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
$(WJH_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(WJH_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(WJH_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
endif
|
|
|
|
# SX_KERNEL
|
|
|
|
SPATH := $($(SX_KERNEL)_SRC_PATH)
|
|
SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
|
|
SMDEP_PATHS := $(shell git submodule status --recursive -- $(SPATH) | awk '{print $$2}' | grep -Ev ' ')
|
|
SMDEP_FILES := $(foreach path,$(SMDEP_PATHS),$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/,$(shell cd $(path) && git ls-files | grep -Ev ' '))))
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
DEP_FILES += $(filter-out $(SMDEP_PATHS),$(shell git ls-files -- $(SPATH) | grep -Ev ' '))
|
|
|
|
$(SX_KERNEL)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_KERNEL)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_KERNEL)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
|
|
$(SX_KERNEL)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
|
|
$(SX_KERNEL)_SMDEP_PATHS := $(SMDEP_PATHS)
|
|
|
|
$(SX_KERNEL_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
|
$(SX_KERNEL_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
$(SX_KERNEL_DEV)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
|
|
$(SX_KERNEL_DEV)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
|
|
$(SX_KERNEL_DEV)_SMDEP_PATHS := $(SMDEP_PATHS)
|