forked from khyperia/weechat-discord
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
34 lines (26 loc) · 647 Bytes
/
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
testdir=./test_dir
.PHONY: all install install_test test run format clippy
all: src/*
cargo build --release
all_debug: src/*
cargo build
.ONESHELL:
install: all
if [[ ! -z $${WEECHAT_HOME} ]]; then
installdir=$${WEECHAT_HOME}/plugins
elif [[ ! -z $${XDG_DATA_HOME} ]]; then
installdir=$${XDG_DATA_HOME}/weechat/plugins
else
installdir=$${HOME}/.weechat/plugins
fi
mkdir -p $${installdir}
cp target/release/libweecord.* $${installdir}
install_test: all_debug
mkdir -p $(testdir)/plugins
cp target/debug/libweecord.* $(testdir)/plugins
run: install
weechat -a
test: install_test
weechat -d $(testdir)
format:
cargo fmt