From 2630688e27e9068ffa7a39ba3972c2f4fb710910 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sat, 8 Mar 2014 11:45:16 +0100 Subject: Build system: internal macros: improve strings comparison and avoid use of shell Signed-off-by: Abdoulaye Walsimou Gaye --- mk/macros.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mk/macros.mk') diff --git a/mk/macros.mk b/mk/macros.mk index bac27c0..ffe0a50 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -42,14 +42,14 @@ embtk_echo_blue = printf $(__embtk_color_blue)$(1)$(__embtk_no_color)"\n" __embtk_msg_h = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" # -# __embtk_mk_strcmp: +# __embtk_streq: # A macro for two strings comparison. It returns y if the strings are identical # and nothing if not. # Note: This macro strips passed parameters # Usage: -# $(call __embtk_mk_strcmp,str1,str2) +# $(call __embtk_streq,str1,str2) # -__embtk_mk_strcmp = $(shell [ $(strip $(1)) = $(strip $(2)) ] && echo y) +__embtk_streq = $(if $(subst x$(1),,x$(2)),,y) # # __embtk_mk_pathexist -- cgit v1.2.3