-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
40 lines (33 loc) · 913 Bytes
/
GNUmakefile
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
.PHONY: all
all:
@dune build
.PHONY: doc
doc:
@dune build @doc
.PHONY: clean
clean:
@dune clean
.PHONY: distclean
distclean: clean
@find . -name "*~" -exec rm {} \;
@rm -rf new_boot
.PHONY: tests
tests:
@dune runtest
.PHONY: install
install: all
@dune install
.PHONY: uninstall
uninstall: all
@dune uninstall
.PHONY: boot
boot:
@echo "Bootstrapping [pa_ocaml] (with backup in a tarball)."
@tar -cf boot_$(shell date +%F_%H-%M-%S).tar boot
@rm -rf new_boot && mkdir new_boot
@dune exec -- pa_ocaml pa_ocaml/pa_lexing.ml > new_boot/pa_lexing.ml
@dune exec -- pa_ocaml pa_ocaml/pa_main.ml > new_boot/pa_main.ml
@dune exec -- pa_ocaml pa_ocaml/pa_ocaml.ml > new_boot/pa_ocaml.ml
@dune exec -- pa_ocaml pa_ocaml/pa_ocaml_prelude.ml > new_boot/pa_ocaml_prelude.ml
@dune exec -- pa_ocaml pa_ocaml/pa_parser.ml > new_boot/pa_parser.ml
@rm -f boot/*.ml && mv new_boot/*.ml boot/ && rm -rf new_boot