gmsl is a nice thing. :-) Thanks.
What about adding a sequence function (doing something similar to /usr/bin/seq) to gmsl?
("seq" is already used for string equal, so I use "sequence")
e.g. $(call sequence,3,5) should return "3 4 5" (like $(shell seq 3 5))
so you can do for-loops and similar stuff:
$foreach i,$(call sequence,$(first),$(last)),do something with $i)
seq [OPTION]... LAST
seq [OPTION]... FIRST LAST
seq [OPTION]... FIRST INCREMENT LAST
I think the one-argument form can be omitted, the two-argument would be the most important (if FIRST > LAST, return empty), the three-argument form is optional.
Log in to post a comment.