1996-11-02 10:05:24 -08:00
|
|
|
|
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 <EFBFBD> ocamldep
|
|
|
|
|
|
|
|
|
|
# The dependency generator
|
|
|
|
|
|
|
|
|
|
CAMLDEP = ocamldep.cmo
|
|
|
|
|
|
|
|
|
|
ocamldep <EFBFBD> {CAMLDEP}
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o ocamldep misc.cmo {CAMLDEP}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i ocamldep
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
ocamldep.ml <EFBFBD> ocamldep.mll
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLLEX} ocamldep.mll
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i ocamldep.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
duplicate -y ocamldep "{BINDIR}ocamldep"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
beforedepend <EFBFBD><EFBFBD> ocamldep
|
|
|
|
|
|
|
|
|
|
# The profiler (not available on the Mac for the moment)
|
|
|
|
|
#
|
|
|
|
|
#CSLPROF = ocamlprof.cmo
|
|
|
|
|
#CSLPROF_IMPORTS = misc.cmo config.cmo clflags.cmo terminfo.cmo <20>
|
|
|
|
|
# location.cmo longident.cmo pstream.cmo parser.cmo lexer.cmo parse.cmo
|
|
|
|
|
#
|
|
|
|
|
#ocamlprof <20> {CSLPROF} profiling.cmo
|
|
|
|
|
# {CAMLC} {LINKFLAGS} -o ocamlprof {CSLPROF_IMPORTS} {CSLPROF}
|
|
|
|
|
#
|
|
|
|
|
#install <20><>
|
|
|
|
|
# duplicate -y ocamlprof "{BINDIR}ocamlprof"
|
|
|
|
|
# duplicate -y ocamlcp "{BINDIR}ocamlcp"
|
|
|
|
|
# duplicate -y profiling.cmi profiling.cmo "{LIBDIR}"
|
|
|
|
|
#
|
|
|
|
|
#clean <20><>
|
|
|
|
|
# delete -i ocamlprof
|
|
|
|
|
|
|
|
|
|
# To make custom toplevels
|
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
duplicate -y ocamlmktop "{BINDIR}ocamlmktop"
|
|
|
|
|
duplicate -y ocamlc-custom "{BINDIR}ocamlc-custom"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# The bytecode disassembler
|
|
|
|
|
|
|
|
|
|
DUMPOBJ = opnames.cmo dumpobj.cmo
|
|
|
|
|
|
|
|
|
|
DumpCamlObj <EFBFBD> {DUMPOBJ}
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o DumpCamlObj misc.cmo tbl.cmo config.cmo ident.cmo <20>
|
|
|
|
|
opcodes.cmo runtimedef.cmo {DUMPOBJ}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i DumpCamlObj
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
opnames.ml <20> ::byterun:instruct.h
|
1996-11-06 08:55:35 -08:00
|
|
|
|
streamedit -e '/<2F>/<2F>*/ delete' <20>
|
|
|
|
|
-e '/enum (<28>)<29>0 {/ replace // "let names_of_" <20>0 "= [|"' <20>
|
|
|
|
|
-e '/};<3B>/ replace // "|]"' <20>
|
|
|
|
|
-e '/<2F>([A-Z][A-Z_0-9a-z]*)<29>0/ replace // "<22>"" <20>0 "<22>"" -c <20>' <20>
|
|
|
|
|
-e '/,/ replace // ";" -c <20>' <20>
|
|
|
|
|
::byterun:instruct.h > opnames.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i opnames.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
beforedepend <EFBFBD><EFBFBD> opnames.ml
|
|
|
|
|
|
|
|
|
|
# Dump .cmx files
|
|
|
|
|
|
|
|
|
|
dumpapprox <EFBFBD> dumpapprox.cmo
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i dumpapprox
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# Print imported interfaces for .cmo files
|
|
|
|
|
|
|
|
|
|
objinfo <EFBFBD> objinfo.cmo
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o objinfo config.cmo objinfo.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i objinfo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# Common stuff
|
|
|
|
|
|
|
|
|
|
.cmo <EFBFBD> .ml
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {default}.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
.cmi <EFBFBD> .mli
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {default}.mli
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i <20>.cm[io] || set status 0
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
depend <EFBFBD> beforedepend
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLRUN} :ocamldep {INCLUDES} <20>.mli <20>.ml > Makefile.Mac.depend
|