forked from sneeuwballen/zipperposition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (73 loc) · 2.37 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
J?=3
all: build test-cached
DUNE_OPTS= -j $(J) --profile=release
build:
@dune build @install $(DUNE_OPTS)
check:
@dune build @check $(DUNE_OPTS)
clean:
@dune clean
doc:
@dune build @doc --profile=release
install: build
@dune install
test: test-dune
test-dune:
@dune runtest --no-buffer -f $(DUNE_OPTS)
uninstall:
@ocamlfind remove zipperposition libzipperposition logtk || true
test-cached:
@dune runtest --no-buffer $(DUNE_OPTS)
# ./tests/quick/all.sh # FIXME?
test-qcheck:
@./tests/run_tests.sh test qcheck
test-long:
@echo "run qcheck tests with --long"
@QCHECK_LONG=1 ./tests/run_tests.sh test qcheck
test-unit:
@./tests/run_tests.sh test units
test-list:
@./tests/run_tests.sh list
@echo "NOTE: "
@echo "to run a particular test: ./tests/run_tests.sh -only-test <path>"
INTERFACE_FILES = $(shell find src -name '*.mli')
IMPLEMENTATION_FILES = $(shell find src -name '*.ml')
VERSION=$(shell awk '/^version:/ {print $$2}' zipperposition.opam)
update_next_tag:
@echo "update version to $(VERSION)..."
zsh -c 'sed -i "s/NEXT_VERSION/$(VERSION)/g" src/**/*.ml{,i}(.)'
zsh -c 'sed -i "s/NEXT_RELEASE/$(VERSION)/g" src/**/*.ml{,i}(.)'
TEST_FILES=tests/ examples/
TEST_TOOL=benchpress
TEST_OPTS?= -j $(J) -c tests/$(TEST_TOOL).sexp --progress
DATE=$(shell date +%FT%H:%M)
snapshots:
@mkdir -p snapshots
check-test-tool:
@if ` which $(TEST_TOOL) > /dev/null ` ; then true ; else echo "install $(TEST_TOOL)"; exit 1; fi
$(TEST_TOOL)-local: check-test-tool snapshots
$(TEST_TOOL) run $(TEST_OPTS) --task zip-local-test \
--summary snapshots/local-$(DATE).txt \
--csv snapshots/local-$(DATE).csv $(TEST_FILES)
.PHONY: docker-build
docker-build:
docker build -t zipperposition .
TARBALL=zipperposition.tar.gz
package: clean
rm $(TARBALL) || true
oasis setup
tar cavf $(TARBALL) Makefile pelletier_problems README.md src/ tests/ utils/
WATCH?=@all
watch:
dune build $(WATCH) -w $(DUNE_OPTS)
ocp-indent:
@which ocp-indent > /dev/null || { \
echo 'ocp-indent not found; please run `opam install ocp-indent`'; \
exit 1 ; \
}
reindent: ocp-indent
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 echo "reindenting: "
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 ocp-indent -i
gallery.svg:
for i in gallery/*.dot ; do dot -Tsvg "$$i" > "gallery/`basename $${i} .dot`.svg" ; done
.PHONY: doc push_doc dot package tags test-all