-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 698 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 698 Bytes
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
SRC=$(shell git ls-files .)
.PHONY: snippet
snippet: ppx_ski.native
ocamlfind ppx_tools/rewriter ./$< snippet.ml
ppx_ski.native: $(SRC)
ocamlbuild -use-ocamlfind $@
.PHONY: sk.cma
sk.cma: $(SRC)
ocamlbuild -use-ocamlfind $@
.PHONY: parsetree
parsetree:
ocamlc -dparsetree snippet.ml
rm snippet.cm*
.PHONY: dumpast
dumpast:
ocamlfind ppx_tools/dumpast snippet.ml
.PHONY: utop
utop: ppx_ski.native sk.cma
utop -ppx ./ppx_ski.native -I _build/sk _build/sk/sk.cma
repl.native: $(SRC)
ocamlbuild -use-ocamlfind $@
.PHONY: repl
repl: repl.native
rlwrap ./$<
.PHONY: clean
clean:
ocamlbuild -clean
.PHONY: example
example:
ocamlbuild -use-ocamlfind example.native && ./example.native