[riot-notifications] [RIOT-OS/RIOT] makefiles/utils/{strings, paths}: Add function library. (#11218)

Gaƫtan Harter notifications at github.com
Wed May 8 16:17:48 CEST 2019

cladmi commented on this pull request.

> @@ -0,0 +1,22 @@
+# String handling functions
+# Return an empty string if the arguments are different (works only for single
+# words
+streq = $(filter $(1),$(2))
+# Get the remaining words in a list (i.e. everything except the first)
+rest = $(wordlist 2,$(words $(1)),$(1))
+# Strings as truth values
+# In make, empty strings function as a "false" value and non-empty ones
+# as true.
+# Return a string ("x") if the argument is empty and vice versa
+strnot = $(if $(1),,x)

The `if` is somehow clear enough and `strnot` is unused.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190508/231a722c/attachment.html>

More information about the notifications mailing list