.PHONY: all build run test clean fmt clippy check release help
all: build
build:
cargo build
release:
cargo build --release
run:
cargo run -- $(ARGS)
test:
cargo test
fmt:
cargo fmt
clippy:
cargo clippy -- -D warnings
check: fmt clippy test
@echo "All checks passed!"
clean:
cargo clean
help:
@echo "Available commands:"
@echo " make build - Build the project"
@echo " make release - Build for release"
@echo " make run ARGS=... - Run the project (e.g., make run ARGS=\"parse colors.txt\")"
@echo " make test - Run unit tests"
@echo " make fmt - Format code"
@echo " make clippy - Lint code"
@echo " make check - Run all checks (fmt, clippy, test)"
@echo " make clean - Clean build artifacts"
publish: check release
@echo "Project is ready to be published!"
@echo "Run 'cargo publish' to release."