forked from EduDo-Inc/spmgen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (39 loc) · 1.76 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
install_name = spmgen
ifndef destination
install_path = /usr/local/bin
else
install_path = $(destination)
endif
# –––––––––––––––––––––––––––––– Install ––––––––––––––––––––––––––––––
# usage `reinstall destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
reinstall: uninstall install
# usage `reinstall_bin destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
reinstall_bin: uninstall install_bin
# usage `reinstall_clean destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
reinstall_clean: uninstall install_clean
# usage `install destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
install: build install_bin
# usage `install_clean destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
install_clean: build_clean install_bin
# usage `install_bin destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
install_bin:
mkdir -p $(install_path)
install .build/release/$(install_name) $(install_path)/$(install_name)
# usage `uninstall destination="./Scripts/.bin"`
# default value for the destination is "/usr/local/bin"
uninstall:
rm -f $(install_path)/$(install_name)
# –––––––––––––––––––––––––––––– Build ––––––––––––––––––––––––––––––
build:
swift package update
swift build -c release --disable-sandbox --build-path '.build'
build_clean:
swift package clean
swift package update
swift build -c release --disable-sandbox --build-path '.build'