DART ?= dart .DEFAULT_GOAL := help .PHONY: help install test lint format build check clean help: @echo 'Targets:' @echo ' install resolve the dependencies' @echo ' test run the test suite (dart test)' @echo ' lint dart format --set-exit-if-changed + dart analyze (read-only)' @echo ' format apply dart format (writes)' @echo ' build compile the CLI to build/cepis' @echo ' check lint + test + build, in that order' @echo ' clean remove build artefacts' .dart_tool/package_config.json: pubspec.yaml $(DART) pub get install: .dart_tool/package_config.json test: install $(DART) test lint: install $(DART) format --output=none --set-exit-if-changed . $(DART) analyze --fatal-infos format: install $(DART) format . build: install @mkdir -p build $(DART) compile exe bin/cepis.dart -o build/cepis check: lint test build clean: rm -rf build .dart_tool