-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (43 loc) · 1.23 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
# add modules as our codebase evolves
MODULES=database field cluster types query makeCluster user main
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
MAIN=main.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind
default: build
utop
build:
$(OCAMLBUILD) $(OBJECTS)
test:
cp issues.txt issues.init ;\
cp issues_test.txt issues.txt ;\
cp login_details.txt login_details.init ;\
cp login_details_test.txt login_details.txt ;\
cp teams.txt teams.init ;\
cp teams_test.txt teams.txt ;\
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential ;\
rm issues.txt ;\
rm login_details.txt ;\
rm teams.txt ;\
mv issues.init issues.txt ;\
mv login_details.init login_details.txt ;\
mv teams.init teams.txt
start:
$(OCAMLBUILD) $(MAIN) && ./$(MAIN)
zip:
zip trakio.zip *.ml* *.txt _tags .ocamlinit .merlin Makefile
docs: docs-public docs-private
docs-public: build
mkdir -p doc.public
ocamlfind ocamldoc -I _build -package ANSITerminal \
-html -stars -d doc.public $(MLIS)
docs-private: build
mkdir -p doc.private
ocamlfind ocamldoc -I _build -package ANSITerminal \
-html -stars -d doc.private \
-inv-merge-ml-mli -m A $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf doc.public doc.private trakio.zip