forked from hazelgrove/hazel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (41 loc) · 1.4 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
TEST_DIR="$(shell pwd)/_build/default/test"
HTML_DIR="$(shell pwd)/_build/default/src/haz3lweb/www"
SERVER="http://0.0.0.0:8000/"
.PHONY: all deps change-deps setup-instructor setup-student dev dev-helper dev-student fmt watch watch-release release release-student echo-html-dir serve serve2 repl test clean
all: dev
deps:
opam update
opam switch import opam.export
change-deps:
opam switch export opam.export
setup-instructor:
cp src/haz3lweb/ExerciseSettings_instructor.re src/haz3lweb/ExerciseSettings.re
setup-student:
cp src/haz3lweb/ExerciseSettings_student.re src/haz3lweb/ExerciseSettings.re
dev-helper:
dune build @src/fmt --auto-promote src --profile dev
dev: setup-instructor dev-helper
dev-student: setup-student dev
fmt:
dune fmt --auto-promote
watch: setup-instructor
dune build @src/fmt --auto-promote src --profile dev --watch
watch-release: setup-instructor
dune build @src/fmt --auto-promote src --profile release --watch
release: setup-instructor
dune build @src/fmt --auto-promote src --profile release
release-student: setup-student
dune build @src/fmt --auto-promote src --profile dev
echo-html-dir:
@echo $(HTML_DIR)
serve:
cd $(HTML_DIR); python3 -m http.server 8000
serve2:
cd $(HTML_DIR); python3 -m http.server 8001
repl:
dune utop src/haz3lcore
test:
dune build @src/fmt @test/fmt --auto-promote src test --profile dev
node $(TEST_DIR)/haz3ltest.bc.js
clean:
dune clean