-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (41 loc) · 1.37 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
TARGET=paraphraser
SOURCES = \
syntax.ml \
lexer.mll \
parser.mly \
paraphraser.ml \
OCAMLBUILD=ocamlbuild -classic-display -use-ocamlfind
#-use-menhir
CAML2HTML=caml2html
OCAMLDOC=ocamldoc
default: byte
all: byte native html
toppara:
utop -I _build/ parser.cmo message.cmo lexer.cmo syntax.cmo drsxp.cmo -init paraphraser.ml
top:
utop -I _build/ parser.cmo message.cmo lexer.cmo syntax.cmo drsxp.cmo -init drstop.ml
stop: clean byte
utop -I _build/ parser.cmo message.cmo lexer.cmo syntax.cmo drsxp.cmo paraphraser.cmo -init top.ml
byte:
$(OCAMLBUILD) -classic-display $(TARGET).byte
native:
$(OCAMLBUILD) -classic-display $(TARGET).native
web: html
echo '<div class="lang">' > web.html
echo "<h3>$(TARGET)</h3>" >> web.html
echo '<div class="version">Last update: ' >> web.html
echo '</div>' >> web.html
echo '<div class="description">' >> web.html
cat description.html >> web.html
echo '</div>' >> web.html
echo '<div class="download">Download source: <a href="src/$(TARGET).zip">$(TARGET).zip</a></div>' >> web.html
/bin/echo -n '<div class="source"><a href="html/$(TARGET).html">View source online</a> (' >> web.html
cat $(SOURCES) | wc -l >> web.html
echo ' lines)</div>' >> web.html
echo "</div>" >> web.html
html:
/bin/mkdir html
$(CAML2HTML) -nf -ln -noannot -o html/$(TARGET).html $(SOURCES)
clean:
/bin/rm -rf web.html html/
$(OCAMLBUILD) -clean