forked from affeldt-aist/coq2html
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (39 loc) · 1.06 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
OCAMLOPT=ocamlopt -I +str -annot
OCAMLLEX=ocamllex
GEN_IDX=generate_index
PROJ_OBJS=common.cmx graphviz.cmx range.cmx xrefTable.cmx generate_index.cmx
all: coq2html ocamldot/ocamldot
coq2html: $(PROJ_OBJS:.cmx=.cmi) $(PROJ_OBJS) coq2html.cmx
$(OCAMLOPT) -o coq2html str.cmxa resources.cmx $(PROJ_OBJS) coq2html.cmx
%.cmx: %.ml
$(OCAMLOPT) -c $*.ml
%.cmi: %.mli
$(OCAMLOPT) -c $*.mli
%.ml: %.mll
$(OCAMLLEX) $*.mll
generate_index.cmx: resources.cmx
coq2html.cmx: resources.cmx
resources.cmx: resources.cmi
RESOURCES=header footer css js redirect
resources.ml: $(RESOURCES:%=coq2html.%)
(for i in $(RESOURCES); do \
echo "let $$i = {xxx|"; \
cat coq2html.$$i; \
echo '|xxx}'; \
echo ''; \
done) > resources.ml
clean:
rm -f coq2html
rm -f coq2html.ml resources.ml
rm -f *.o *.cm?
$(MAKE) -C ocamldot/ clean
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
install:
install coq2html $(BINDIR)/coq2html
depend:
ocamldep *.mli *.ml > .depend
-include .depend
# ocamldot
ocamldot/ocamldot: ocamldot/
$(MAKE) -C ocamldot/ ocamldot