-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (45 loc) · 1.2 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
BUILD_DIR=$(shell pwd)/_build/default
HTML_DIR=$(shell pwd)/_build/default/src/grvweb
SERVER="http://0.0.0.0:8000/"
all: dev
deps:
opam install \
dune utop ocamlformat odoc \
incr_dom js_of_ocaml ppx_deriving ppx_let ppx_sexp_conv sexplib
dev:
dune build @src/fmt --auto-promote || true
dune build --profile dev
dune build @doc
dune build src/grvweb/{index.html,style.css}
@echo
test: dev
dune build @runtest -f
@echo
release:
dune build --profile release
cat-lang:
@cat "$(BUILD_DIR)/src/grvcore/Lang.ml"
echo-lang:
@echo "$(BUILD_DIR)/src/grvcore/Lang.ml"
echo-doc:
@echo "$(BUILD_DIR)/src/grvdoc/master.pdf"
echo-html-doc:
@echo "$(BUILD_DIR)/_doc/_html/GRV/index.html"
echo-html-dir:
@echo "$(HTML_DIR)"
echo-html:
@echo "$(HTML_DIR)/index.html"
win-chrome:
"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe" "$(HTML_DIR)/index.html"
win-firefox:
"/mnt/c/Program Files (x86)/Mozilla Firefox/firefox.exe" "$(HTML_DIR)/index.html"
open:
open "$(HTML_DIR)/index.html"
serve:
cd $(HTML_DIR); python3 -m http.server 8000
repl:
dune utop src/grvcore
clean:
dune clean
.PHONY: all deps dev test release echo-html-dir echo-html echo-doc \
win-chrome win-firefox repl clean