-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
69 lines (57 loc) · 1.66 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
SRCFILES = lib/*.ml lib/*.mli bin/*.ml bin/*.mli profiling/*.ml tests/*.ml
OCPINDENT = ocp-indent \
--inplace \
$(SRCFILES)
.PHONY: all
all :
python3 update-version-string.py
dune build @all
.PHONY: podman-build
podman-build:
podman build --format docker -t localhost/docfd -f containers/docfd/Containerfile .
.PHONY: podman-build-demo-vhs
podman-build-demo-vhs:
podman build --format docker -t localhost/docfd-demo-vhs -f containers/demo-vhs/Containerfile .
.PHONY: lock
lock:
opam lock .
.PHONY: release-build
release-build :
python3 update-version-string.py
dune build --release bin/docfd.exe
mkdir -p release
cp -f _build/default/bin/docfd.exe release/docfd
chmod 755 release/docfd
.PHONY: release-static-build
release-static-build :
python3 update-version-string.py
OCAMLPARAM='_,ccopt=-static' dune build --release bin/docfd.exe
mkdir -p release
cp -f _build/default/bin/docfd.exe release/docfd
chmod 755 release/docfd
.PHONY: tests
tests :
# Cleaning and rebuilding here to make sure cram tests actually use a recent binary,
# since Dune (as of 3.14.0) doesn't trigger rebuild of binary when
# invoking cram tests, even if the source code has changed.
make clean
make
OCAMLRUNPARAM=b dune exec tests/main.exe --no-buffer --force
dune build @file-collection-tests
dune build @line-wrapping-tests
dune build @misc-behavior-tests
dune build @printing-tests
dune build @match-type-tests
.PHONY: demo-vhs
demo-vhs :
for file in demo-vhs-tapes/*; do ./demo-vhs.sh $$file; done
rm dummy.gif
.PHONY: profile
profile :
OCAMLPARAM='_,ccopt=-static' dune build --release profiling/main.exe
.PHONY: format
format :
$(OCPINDENT)
.PHONY : clean
clean:
dune clean