forked from exercism/sml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (17 loc) · 670 Bytes
/
Makefile
File metadata and controls
21 lines (17 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dirs := $(wildcard exercises/practice/*)
all-tests := $(addprefix test-, $(notdir $(dirs)))
test: $(all-tests)
test-%:
$(eval exercise := $(patsubst test-%, %, $@))
@echo
@ls ./exercises/practice/$(exercise)/.docs/instructions.md > /dev/null
@# check stub type
@cd ./exercises/practice/$(exercise) && \
poly -q --use test | grep 'error: Type error' | \
wc -l | xargs -I @ expr @ = 0 > /dev/null || \
{ echo '$(exercise).sml is faulty'; exit 1; }
@cd ./exercises/practice/$(exercise) && cat test.sml | sed 's/$(exercise).sml/.meta\/example.sml/' | poly -q
@echo
redeploy-testlib:
poly --script scripts/redeploy-testlib.sml
.PHONY: test redeploy-testlib