-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
47 lines (32 loc) · 985 Bytes
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
all: build test-dune
dev: build test
OPTS ?= --profile=release
build:
@dune build $(OPTS) @all
smtlib-cat:
@dune build src/bin/smtlib_cat.exe $(OPTS)
@ln -sf _build/default/src/bin/smtlib_cat.exe
test: test-dune test-cat test-idempotent
test-dune:
@dune runtest --force --no-buffer
format:
@dune fmt --auto-promote
format-check:
@dune build $(DUNE_OPTS) @fmt --display=quiet
doc:
@dune build @doc
clean:
@dune clean
watch:
@dune build @all -w $(OPTS)
BENCH_DIR ?= benchmarks/
test-cat: build smtlib-cat
@echo testing that '`parser`' works…
@[ -d $(BENCH_DIR) ] || (echo "expect benchmarks/ to exist" && exit 1)
@find -L $(BENCH_DIR) -name '*.smt2' -print0 | xargs -0 ./smtlib_cat.exe -p -q
test-idempotent: build smtlib-cat
@echo testing that '`printer | parser`' works…
@find -L $(BENCH_DIR) -name '*.smt2' -print | while read i ; do \
(./smtlib_cat.exe -p "$$i" | ./smtlib_cat.exe -q) || exit 1; \
done
.PHONY: doc watch clean test all build