-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakefun.mak
More file actions
20 lines (17 loc) · 858 Bytes
/
makefun.mak
File metadata and controls
20 lines (17 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#-------------------------------------------------------------------------------
# following https://www.gnu.org/software/make/manual/html_node/Syntax-of-Functions.html#Syntax-of-Functions
comma:= ,
empty:=
space:= $(empty) $(empty)
#-------------------------------------------------------------------------------
# LISTS
# transforms a list of space separated into a list of comma separated
to_clist = $(subst $(space),$(comma),$(strip $(1)))
# transforms a list of comma separated into a list of space separated
to_slist = $(subst $(space),$(comma),$(strip $(1)))
#-------------------------------------------------------------------------------
# COPY
copy_list = $(foreach file,$(1),$(shell cp $(file) $(2)))
#-------------------------------------------------------------------------------
# MOVE
mv_list = $(foreach file,$(1),$(shell mv $(file) $(2)))