aboutsummaryrefslogtreecommitdiffstats
path: root/data/icons/utils.mk
blob: 84b1c820769be5990d3bdac185c6f67c9aa50793 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# define a variable containing a single space
blank :=
space := $(blank) $(blank)
# split string $3 with $1 as separator and return the token in position $2
define token
$(word $2, $(subst $1, ,$3))
endef
# split string $3 with $1 as separator and reassemble it using the indexes in $2
define reorder
$(subst $(space),$1,$(foreach i,$2,$(call token,$1,$i,$3)))
endef