1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34SHELL := /usr/bin/env bash
.PHONY: test
test: ## Run all tests
test: test-unit test-example test-roundtrip
.PHONY: test-watch
test-watch:
fswatch -0 -e '*~$$' -e '/\.#' -e '#$$' lib test \
| xargs -0 -I {} bash -c 'dart test $$([[ {} =~ test/.* ]] && echo {})'
.PHONY: test-unit
test-unit:
dart test --chain-stack-traces
.PHONY: test-example
test-example:
diff <(dart example/example.dart) test/example-gold.txt
roundtrip = diff <(dart test/bin/roundtrip.dart $(1)) $(1)
.PHONY: test-roundtrip
test-roundtrip:
$(call roundtrip,test/org-manual.org)
$(call roundtrip,test/org-syntax.org)
.PHONY: help
help: ## Show this help text
$(info usage: make [target])
$(info )
$(info Available targets:)
@awk -F ':.*?## *' '/^[^\t].+?:.*?##/ \
{printf " %-24s %s\n", $$1, $$2}' $(MAKEFILE_LIST)