-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (34 loc) · 1.32 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
OCAMLBUILD=ocamlbuild -use-ocamlfind -ocamlc '-toolchain metaocaml ocamlc' \
-ocamlopt '-toolchain metaocaml ocamlopt'
all: check-compiler letrec.cma letrec.cmxa ppx_letrec.byte
test: tests.byte
./tests.byte
install:
ocamlfind install letrec META \
_build/lib/*.cma \
_build/lib/*.cmx \
_build/lib/*.cmxa \
_build/lib/*.a \
_build/lib/*.cmi \
_build/lib/*.mli \
_build/ppx/ppx_letrec.byte
uninstall:
ocamlfind remove letrec
clean:
$(OCAMLBUILD) -clean
%.cma:
$(OCAMLBUILD) -use-ocamlfind $@
%.cmxa:
$(OCAMLBUILD) -use-ocamlfind $@
%.native:
$(OCAMLBUILD) -use-ocamlfind $@
%.byte:
$(OCAMLBUILD) -use-ocamlfind $@
tests.byte: letrec.cma lib_test/tests.ml
check-compiler:
@test $$(opam show ocaml-variants --field=installed-version) = "4.14.1+BER" \
|| test $$(opam show ocaml-variants --field=installed-version) = "4.11.1+BER" \
|| test $$(opam show ocaml-variants --field=installed-version) = "4.07.1+BER" \
|| test $$(opam show ocaml-variants --field=installed-version) = "4.04.0+BER" \
|| (echo 1>&2 "Please use OPAM switch 4.04.0+BER, 4.07.1+BER, 4.11.1+BER or 4.14.1+BER"; exit 1)
.PHONY: check-compiler all clean test