forked from FStarLang/FStar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
93 lines (73 loc) · 2.5 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.PHONY: all package clean boot 0 1 2 3 hints bench libs output install uninstall package_unknown_platform no-ulib-checked
include .common.mk
all:
$(Q)+$(MAKE) -C src/ocaml-output
$(Q)+$(MAKE) -C ulib/ml
$(Q)+$(MAKE) -C ulib
install:
$(Q)+$(MAKE) -C src/ocaml-output install
# The directory where we install files when doing "make install".
# Overridden via the command-line by the OPAM invocation.
PREFIX=$(shell pwd)/fstar
uninstall:
ocamlfind remove fstarlib
ocamlfind remove fstar-compiler-lib
ocamlfind remove fstar-tactics-lib
rm -rf \
$(PREFIX)/lib/fstar \
$(PREFIX)/doc/fstar \
$(PREFIX)/etc/fstar \
$(PREFIX)/bin/fstar.exe \
$(PREFIX)/share/fstar
package: all
$(Q)+$(MAKE) -C src/ocaml-output package
package_unknown_platform: all
$(Q)+$(MAKE) -C src/ocaml-output package_unknown_platform
clean:
$(Q)+$(MAKE) -C ulib clean
$(Q)+$(MAKE) -C src/ocaml-output clean
# Shortcuts for developers
# Build the OCaml snapshot. NOTE: This will not build the standard library,
# nor tests, and native tactics will not run
1:
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/fstar.exe
# Bootstrap just the compiler, not the library and tests;
# fastest way to incrementally build a patch to the compiler
boot:
$(Q)+$(MAKE) -C src/ ocaml
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/fstar.exe
boot_tests:
$(Q)+$(MAKE) -C src/ ocaml
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/tests.exe
boot_libs: boot
$(Q)+$(MAKE) libs
boot.ocaml:
$(Q)+$(MAKE) -C src/ ocaml
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/fstar.ocaml
# Alias for boot
2: boot
# Build the snapshot and then regen, i.e. 1 + 2
3:
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/fstar.exe
$(Q)+$(MAKE) -C src/ ocaml
$(Q)+$(MAKE) -C src/ocaml-output ../../bin/fstar.exe
# Build the binary libraries: fstar-compiler-lib, fstarlib, fstartaclib
# Removes the .mgen files to trigger rebuild of the libraries if needed.
# This does NOT verify the library modules.
libs:
$(Q)+$(MAKE) -C src/ocaml-output
$(Q)rm -f ulib/*.mgen
$(Q)+$(MAKE) -C ulib/ml
# Regenerate all hints for the standard library and regression test suite
hints:
+$(Q)OTHERFLAGS=--record_hints $(MAKE) -C ulib/
+$(Q)OTHERFLAGS=--record_hints $(MAKE) -C ulib/ml
+$(Q)OTHERFLAGS=--record_hints $(MAKE) -C src/ uregressions
bench:
./bin/run_benchmark.sh
# Regenerate and accept expected output tests. Should be manually
# reviewed before checking in.
output:
$(Q)+$(MAKE) -C tests/error-messages accept
$(Q)+$(MAKE) -C tests/interactive accept
$(Q)+$(MAKE) -C tests/bug-reports output-accept