-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.28 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.28 KB
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
.PHONY: help build test docs docs-stop clean install
help:
@echo "vex - Makefile commands"
@echo ""
@echo " make build - Build release binary"
@echo " make test - Run all tests"
@echo " make docs - Generate and serve documentation"
@echo " make docs-stop - Stop documentation server"
@echo " make clean - Clean build artifacts"
@echo " make install - Install to ~/.local/bin"
@echo " make clippy - Run clippy linter"
@echo " make fmt - Format code"
@echo " make bench - Run benchmarks"
build:
cargo build --release
test:
cargo test --all
docs:
@echo "Generating documentation..."
RUSTDOCFLAGS="--html-in-header docs/header.html" cargo doc --no-deps
cp docs/custom.css target/doc/
@echo "Serving docs at http://localhost:8888/vex/index.html"
@lsof -ti:8888 | xargs kill -9 2>/dev/null || true
@cd target/doc && python3 -m http.server 8888 &
@sleep 1
open http://localhost:8888/vex/index.html
docs-stop:
@lsof -ti:8888 | xargs kill 2>/dev/null && echo "Documentation server stopped" || echo "No server running"
clean:
cargo clean
install: build
cp target/release/vex ~/.local/bin/vex
chmod +x ~/.local/bin/vex
@echo "Installed to ~/.local/bin/vex"
clippy:
cargo clippy -- -D warnings
fmt:
cargo fmt
bench:
cargo bench