-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (30 loc) · 1.26 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
USER_PATH = $(HOME)/.local/share/pop-launcher/plugins/app-profiles
SYSTEM_PATH = /etc/pop-launcher/plugins/app-profiles/app-profiles
CONFIG_DIR = config
PHONY := test_user test_system install_user install_system uninstall_user uninstall_system
test:
cargo check
cargo test
build_test: test
cargo build
build_release: test
cargo clean
cargo build --release
cp_config_user:
install -Dm0764 $(realpath .)/plugin.ron ${USER_PATH}/plugin.ron
install -Dm0764 $(realpath ${CONFIG_DIR})/*.ron ${USER_PATH}/${CONFIG_DIR}/*.ron
cp_config_system:
install -Dm0774 $(realpath .)/plugin.ron ${SYSTEM_PATH}/plugin.ron
install -Dm0774 $(realpath ${CONFIG_DIR})/*.ron ${SYSTEM_PATH}/${CONFIG_DIR}/*.ron
test_user: build_test cp_config_user
install -Dm0754 $(realpath target/debug)/app-profiles ${USER_PATH}/app-profiles
test_system: build_test cp_config_system
install -Dm0774 $(realpath target/debug)/app-profiles ${SYSTEM_PATH}/app-profiles
install_user: build_release cp_config_user
install -Dm0754 $(realpath target/release)/app-profiles ${USER_PATH}/app-profiles
install_system: build_release cp_config_system
install -Dm0774 $(realpath target/release)/app-profiles ${SYSTEM_PATH}/app-profiles
uninstall_user:
rm -r ${USER_PATH}
uninstall_system:
rm -r ${SYSTEM_PATH}