xref: /OK3568_Linux_fs/external/security/rk_tee_user/v2/scripts/common.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1# Makefile script used in various OP-TEE test components
2
3# Since 'clean' make rules rely on 'rmdir', removed directories shall
4# not end with 'current directory' (./ or .) subpath information.
5# This macro remove trailing './' info from input path.
6define strip-trailing-slashes-and-dots
7$(eval _o := $(patsubst %/,%,$(patsubst %/.,%,$(1))))$(if \
8	$(filter-out $(1),$(_o)),$(call strip-trailing-slashes-and-dots,$(_o)),$(_o))
9endef
10