blob: c8cf27ceac9e0cddc62dd370d7442c438582044f (
plain)
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
94
95
96
97
98
99
100
101
102
103
|
CAMLRUN = ::boot:ocamlrun
CAMLC = {CAMLRUN} ::boot:ocamlc -I ::boot:
CAMLLEX = {CAMLRUN} ::boot:ocamllex
INCLUDES = -I ::utils: -I ::parsing: -I ::typing: -I ::bytecomp: -I ::asmcomp:
COMPFLAGS = {INCLUDES}
LINKFLAGS = {INCLUDES}
all Ä ocamldep
# The dependency generator
CAMLDEP_IMPORTS = misc.cmo config.cmo clflags.cmo terminfo.cmo ¶
linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo ¶
syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
CAMLDEP = ocamldep.cmo
ocamldep Ä {CAMLDEP}
{CAMLC} {LINKFLAGS} -o ocamldep {CAMLDEP_IMPORTS} {CAMLDEP}
clean ÄÄ
delete -i ocamldep
install ÄÄ
duplicate -y ocamldep "{BINDIR}ocamldep"
# The profiler (not available on the Mac for the moment)
#
#CSLPROF = ocamlprof.cmo
#CSLPROF_IMPORTS = misc.cmo config.cmo clflags.cmo terminfo.cmo ¶
# linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo ¶
# syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
#
#ocamlprof Ä {CSLPROF} profiling.cmo
# {CAMLC} {LINKFLAGS} -o ocamlprof {CSLPROF_IMPORTS} {CSLPROF}
#
#install ÄÄ
# duplicate -y ocamlprof "{BINDIR}ocamlprof"
# duplicate -y ocamlcp "{BINDIR}ocamlcp"
# duplicate -y profiling.cmi profiling.cmo "{LIBDIR}"
#
#clean ÄÄ
# delete -i ocamlprof
# To make custom toplevels
install ÄÄ
duplicate -y ocamlmktop.tpl "{BINDIR}ocamlmktop"
duplicate -y ocamlc-custom "{BINDIR}ocamlc-custom"
# The bytecode disassembler
DUMPOBJ = opnames.cmo dumpobj.cmo
DumpCamlObj Ä {DUMPOBJ}
{CAMLC} {LINKFLAGS} -o DumpCamlObj misc.cmo tbl.cmo config.cmo ident.cmo ¶
opcodes.cmo {DUMPOBJ}
clean ÄÄ
delete -i DumpCamlObj
opnames.ml Ä ::byterun:instruct.h
streamedit -e '/¶/¶*/ delete' ¶
-e '/enum (Å)¨0 {/ replace // "let names_of_" ¨0 "= [|"' ¶
-e '/};°/ replace // "|]"' ¶
-e '/([A-Z][A-Z_0-9a-z]*)¨0/ replace // "¶"" ¨0 "¶"" -c °' ¶
-e '/,/ replace // ";" -c °' ¶
::byterun:instruct.h > opnames.ml
clean ÄÄ
delete -i opnames.ml
beforedepend ÄÄ opnames.ml
# Dump .cmx files
dumpapprox Ä dumpapprox.cmo
{CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
clean ÄÄ
delete -i dumpapprox
# Print imported interfaces for .cmo files
objinfo Ä objinfo.cmo
{CAMLC} {LINKFLAGS} -o objinfo config.cmo objinfo.cmo
clean ÄÄ
delete -i objinfo
# Common stuff
.cmo Ä .ml
{CAMLC} -c {COMPFLAGS} {default}.ml
.cmi Ä .mli
{CAMLC} -c {COMPFLAGS} {default}.mli
clean ÄÄ
delete -i Å.cm[io] || set status 0
depend Ä beforedepend
{CAMLRUN} :ocamldep {INCLUDES} Å.mli Å.ml > Makefile.Mac.depend
|