-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
40 lines (32 loc) · 1.22 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
$(VERBOSE).SILENT:
.PHONY: test
default: test
DEBUG_ROOT=target/release
RELEASE_ROOT=target/release
XBASE_LOCAL_ROOT=~/.local/share/xbase
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
test:
cargo test --workspace
lint:
cargo clippy --workspace
nix-shell -p lua51Packages.luacheck --command 'luacheck lua/xbase && exit 0 || exit 1'
watch:
cargo watch -x 'build -p xbase-sourcekit-helper' -x 'run --bin=gen_bindings --features gen' -x 'run xbase' -w 'crates' -w 'src' -c
clean:
rm -rf $(XBASE_LOCAL_ROOT) bin
install: clean
killall xbase xbase-sourcekit-helper || true
mkdir $(XBASE_LOCAL_ROOT)
cargo build -p xbase -p xbase-sourcekit-helper --release
mv target/release/xbase $(XBASE_LOCAL_ROOT)/xbase
mv target/release/xbase-sourcekit-helper $(XBASE_LOCAL_ROOT)/xbase-sourcekit-helper
echo "DONE"
install_debug: clean
killall xbase xbase-sourcekit-helper || true
mkdir $(XBASE_LOCAL_ROOT)
RUST_LOG=trace cargo build -p xbase -p xbase-sourcekit-helper
ln -sf $(ROOT_DIR)/target/debug/xbase $(XBASE_LOCAL_ROOT)/xbase
ln -sf $(ROOT_DIR)/target/debug/xbase-sourcekit-helper $(XBASE_LOCAL_ROOT)/xbase-sourcekit-helper
echo "DONE"
free_space:
cargo clean