-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 946 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
35
36
37
38
# Clean the project
clean:
cargo clean
# Build the project
build:
cargo build --all-targets --all-features
# Build the project in release mode
release:
cargo build --release --all-targets --all-features
# Test the project's docs comments
test-doc:
cargo test --all-features --release --doc
# Test the project with all tests and using native cargo test runner
test-all:
cargo test --all-features --release $(CARGO_EXTRA_ARGS) -- --nocapture $(BIN_EXTRA_ARGS)
# Format the code
format:
cargo +nightly fmt -- --check
# Lint the code
lint:
cargo clippy --all-features --all-targets --tests $(CARGO_EXTRA_ARGS) -- -W clippy::all -D warnings
generate-doc:
@echo ""
@echo "Generating the documentation."
@echo ""
RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps
@echo ""
@echo "The documentation is available at: ./target/doc"
@echo ""
.PHONY: all clean build release test-doc test-all format lint generate-doc