summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-26 12:38:22 -0300
committerMurilo Ijanc <[email protected]>2026-07-26 12:38:22 -0300
commit8e719fc715eb7ae9aa1c842e633f15b5c6cd3688 (patch)
tree4afda3d13e1b772f2c9a5cf9ceea5e84c647ebdd /Makefile
downloaddart-0.1.0.tar.gz
Initial importv0.1.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bf12d68
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+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