.PHONY: all build test validate validate-inner purge clean install help upstream bench
all: build
build:
cargo build
release:
cargo build --release
test:
cargo test
upstream: beads/bd-upstream
beads/bd-upstream:
cd beads && go build -o bd-upstream ./cmd/bd
validate: purge
@time $(MAKE) validate-inner
validate-inner: test
@echo "Running cargo fmt check..."
cargo fmt -- --check
@echo "Running clippy..."
cargo clippy -- -D warnings
@echo "All validation checks passed!"
purge:
@echo "Purging upstream bd artifacts..."
@./purge-bd-upstream.sh
fmt:
cargo fmt
bench: release
@echo "Running benchmarks with release build..."
@./benches/benchmark.sh
clean:
cargo clean
rm -rf scratch/*/beads.lock
(cd scratch && git clean -fxd)
install: release
mkdir -p ~/.local/bin
cp target/release/bd ~/.local/bin/
help:
@echo "Minibeads Makefile targets:"
@echo " make build - Build debug binary"
@echo " make release - Build release binary"
@echo " make test - Run unit tests"
@echo " make validate - Run all validation checks (test, fmt, clippy)"
@echo " make fmt - Format code with rustfmt"
@echo " make bench - Run performance benchmarks"
@echo " make clean - Clean build artifacts"
@echo " make install - Install release binary to ~/.local/bin"
@echo " make help - Show this help message"