2 # Function for converting Windows style slashes into Unix style
3 slashfix
= $(subst \
,/,$(1))
5 # Function for converting an absolute path to one relative
6 # to the top of the source tree
7 toprel
= $(subst $(realpath
$(ROOT_DIR
))/,,$(abspath
$(1)))
9 # Function to convert to all lowercase
10 lc
= $(subst A
,a
,$(subst B
,b
,$(subst C
,c
,$(subst D
,d
,$(subst E
,e
,$(subst F
,f
,$(subst G
,g
,$(subst H
,h
,$(subst I
,i
,$(subst J
,j
,$(subst K
,k
,$(subst L
,l
,$(subst M
,m
,$(subst N
,n
,$(subst O
,o
,$(subst P
,p
,$(subst Q
,q
,$(subst R
,r
,$(subst S
,s
,$(subst T
,t
,$(subst U
,u
,$(subst V
,v
,$(subst W
,w
,$(subst X
,x
,$(subst Y
,y
,$(subst Z
,z
,$1))))))))))))))))))))))))))
11 # Function to make all lowercase and replace spaces with -
13 SPACE
:= $(EMPTY
) $(EMPTY
)
14 smallify
= $(subst $(SPACE
),-,$(call lc
,$1))