summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/macros.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/macros.mk b/mk/macros.mk
index db0df3a..3297707 100644
--- a/mk/macros.mk
+++ b/mk/macros.mk
@@ -49,6 +49,16 @@ define embtk_echo_blue
endef
#
+# __embtk_mk_strcmp:
+# 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)
+#
+__embtk_mk_strcmp=$(shell [ $(strip $(1)) = $(strip $(2)) ] && echo y)
+
+#
# wget wrapper
# usage: $(call embtk_wget,$(OUTPUT_FILE),$(SITE),$(FOREIGN_FILE))
#