.PHONY: all build test test-unit test-golden clean install help
CARGO = cargo
TARGET = target/release/kugiri
all: build test
build:
@echo "Building kugiri..."
@$(CARGO) build --release
test: test-unit test-golden
test-unit:
@echo "Running unit tests..."
@$(CARGO) test
test-golden: build
@echo "Running golden tests..."
@cd tests && ./run_golden_tests.sh
update-golden:
@echo "Removing golden files for regeneration..."
@rm -f tests/golden/*.golden
@$(MAKE) test-golden
clean:
@echo "Cleaning build artifacts..."
@$(CARGO) clean
@rm -f tests/golden/*.output
install: build
@echo "Installing kugiri..."
@$(CARGO) install --path .
help:
@echo "kugiri - Marker-based block editing CLI"
@echo ""
@echo "Available targets:"
@echo " make build - Build the release binary"
@echo " make test - Run all tests (unit + golden)"
@echo " make test-unit - Run unit tests only"
@echo " make test-golden - Run golden tests only"
@echo " make update-golden - Regenerate all golden test files"
@echo " make clean - Clean build artifacts"
@echo " make install - Install kugiri binary"
@echo " make help - Show this help message"