Commit 7f46fb47 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

build: move _uniq function to spdk.common.mk



We will use this in the env_dpdk pkg-config file generation in a future patch.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: Ied3be16bb2564aea905d8c679633193ea583c275
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20560


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent c2ab5b08
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -5,15 +5,6 @@

include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk

# _uniq returns the unique elements from the list specified. It does
# not change the order of the elements. If the same element occurs
# multiple times in the list, the last instance is kept and the others
# removed.
# Example: _uniq(conf log json log util util log util) = conf json log util
define _uniq
$(if $1,$(call _uniq,$(filter-out $(lastword $1),$1)) $(lastword $1))
endef

define _deplibs
$(if $1,$(foreach d,$1,$(d) $(call _deplibs,$(DEPDIRS-$(d)))))
endef
+9 −0
Original line number Diff line number Diff line
@@ -549,3 +549,12 @@ endef
define cc_version_eq
$(shell [ "$(call cc_version)" = "$(1)" ] && echo 1 || echo 0)
endef

# _uniq returns the unique elements from the list specified. It does
# not change the order of the elements. If the same element occurs
# multiple times in the list, the last instance is kept and the others
# removed.
# Example: _uniq(conf log json log util util log util) = conf json log util
define _uniq
$(if $1,$(call _uniq,$(filter-out $(lastword $1),$1)) $(lastword $1))
endef