.PHONY: all build check test lint fmt clippy doc clean ci help deps-check \
mdbook mdbook-serve mdbook-clean mdbook-test doc-all doc-serve clean-all
all: check
build:
cargo build
release:
cargo build --release
check:
cargo check --all-targets --all-features
test:
cargo test --all-features
test-verbose:
cargo test --all-features -- --nocapture
fmt:
cargo fmt --all -- --check
fmt-fix:
cargo fmt --all
clippy:
cargo clippy --all-targets --all-features -- -D warnings
clippy-fix:
cargo clippy --all-targets --all-features --fix --allow-dirty
doc:
cargo doc --no-deps --all-features
doc-open:
cargo doc --no-deps --all-features --open
mdbook:
mdbook build docs
mdbook-serve:
mdbook serve docs --open
mdbook-clean:
rm -rf docs/book
mdbook-test:
mdbook test docs
doc-all: doc mdbook
@echo "All documentation built successfully!"
doc-serve: doc mdbook
@mkdir -p docs/book/api
@cp -r target/doc/* docs/book/api/
@echo "Documentation available at docs/book/"
@echo " - Guide: docs/book/index.html"
@echo " - API: docs/book/api/fugue_evo/index.html"
mdbook serve docs --open
clean:
cargo clean
clean-all: clean mdbook-clean
@echo "All build artifacts cleaned!"
deps-check:
@echo "Checking for duplicate rand-stack majors (EV-74)..."
@if cargo tree -d 2>/dev/null | grep -E '^(rand|rand_core|rand_chacha) v'; then \
echo "ERROR: duplicate major of the rand stack detected (see EV-74 / Cargo.toml note)"; \
exit 1; \
else \
echo "OK: single rand-stack major."; \
fi
ci: fmt clippy check test deps-check doc mdbook
@echo "CI pipeline completed successfully!"
quick: fmt-fix clippy check test
@echo "Quick checks completed!"
watch:
cargo watch -x test
bench:
cargo bench
audit:
cargo audit
update:
cargo update
outdated:
cargo outdated
help:
@echo "Available targets:"
@echo " all - Default target (runs check)"
@echo " build - Build the project"
@echo " release - Build in release mode"
@echo " check - Run cargo check (type checking)"
@echo " test - Run all tests"
@echo " test-verbose - Run tests with output"
@echo " fmt - Check code formatting"
@echo " fmt-fix - Fix code formatting"
@echo " clippy - Run clippy linter"
@echo " clippy-fix - Run clippy and apply fixes"
@echo " doc - Generate rustdoc documentation"
@echo " doc-open - Generate and open rustdoc"
@echo " mdbook - Build mdbook documentation"
@echo " mdbook-serve - Serve mdbook with live reload"
@echo " mdbook-clean - Clean mdbook build artifacts"
@echo " mdbook-test - Test code examples in mdbook"
@echo " doc-all - Build all documentation (rustdoc + mdbook)"
@echo " doc-serve - Build and serve all documentation"
@echo " clean - Clean cargo build artifacts"
@echo " clean-all - Clean all build artifacts (cargo + mdbook)"
@echo " ci - Run full CI pipeline"
@echo " deps-check - Fail if a duplicate rand-stack major exists (EV-74)"
@echo " quick - Run quick development checks"
@echo " watch - Watch for changes and run tests"
@echo " bench - Run benchmarks"
@echo " audit - Check for security vulnerabilities"
@echo " update - Update dependencies"
@echo " outdated - Show outdated dependencies"
@echo " help - Show this help message"