1999-11-17 10:59:06 -08:00
|
|
|
|
#########################################################################
|
|
|
|
|
# #
|
|
|
|
|
# Objective Caml #
|
|
|
|
|
# #
|
|
|
|
|
# Damien Doligez, projet Para, INRIA Rocquencourt #
|
|
|
|
|
# #
|
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
|
# under the terms of the Q Public License version 1.0. #
|
|
|
|
|
# #
|
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
|
1996-11-02 10:05:24 -08:00
|
|
|
|
CAMLRUN = ::boot:ocamlrun
|
1999-11-29 11:04:28 -08:00
|
|
|
|
CAMLC = "{CAMLRUN}" ::boot:ocamlc -I ::boot:
|
|
|
|
|
CAMLLEX = "{CAMLRUN}" ::boot:ocamllex
|
1996-11-02 10:05:24 -08:00
|
|
|
|
INCLUDES = -I ::utils: -I ::parsing: -I ::typing: -I ::bytecomp: -I ::asmcomp:
|
|
|
|
|
COMPFLAGS = {INCLUDES}
|
|
|
|
|
LINKFLAGS = {INCLUDES}
|
|
|
|
|
|
1999-11-29 11:04:28 -08:00
|
|
|
|
all <EFBFBD> ocamldep ocamldumpobj objinfo primreq keywords
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# The dependency generator
|
|
|
|
|
|
1999-11-08 09:06:33 -08:00
|
|
|
|
CAMLDEP_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
|
1999-02-13 15:28:06 -08:00
|
|
|
|
linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
|
|
|
|
|
syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
|
|
|
|
|
|
1996-11-02 10:05:24 -08:00
|
|
|
|
CAMLDEP = ocamldep.cmo
|
|
|
|
|
|
|
|
|
|
ocamldep <EFBFBD> {CAMLDEP}
|
1999-02-13 15:28:06 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o ocamldep {CAMLDEP_IMPORTS} {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
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1999-11-29 11:04:28 -08:00
|
|
|
|
duplicate -y ocamldep "{BINDIR}ocamldep"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
1999-11-08 11:03:57 -08:00
|
|
|
|
# The profiler (not available on MacOS for the moment)
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#CSLPROF = ocamlprof.cmo
|
1999-11-08 09:06:33 -08:00
|
|
|
|
#CSLPROF_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
|
1999-02-13 15:28:06 -08:00
|
|
|
|
# linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
|
1997-08-22 01:55:41 -07:00
|
|
|
|
# syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#ocamlprof <20> {CSLPROF} profiling.cmo
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# {CAMLC} {LINKFLAGS} -o ocamlprof {CSLPROF_IMPORTS} {CSLPROF}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#install <20><>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# duplicate -y ocamlprof "{BINDIR}ocamlprof"
|
|
|
|
|
# duplicate -y ocamlcp "{BINDIR}ocamlcp"
|
|
|
|
|
# duplicate -y profiling.cmi profiling.cmo "{LIBDIR}"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#clean <20><>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# delete -i ocamlprof
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# To make custom toplevels
|
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1998-11-06 07:10:29 -08:00
|
|
|
|
duplicate -y ocamlmktop.tpl "{BINDIR}ocamlmktop"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# The bytecode disassembler
|
|
|
|
|
|
|
|
|
|
DUMPOBJ = opnames.cmo dumpobj.cmo
|
|
|
|
|
|
1999-11-17 07:06:24 -08:00
|
|
|
|
ocamldumpobj <EFBFBD> {DUMPOBJ}
|
|
|
|
|
{CAMLC} {LINKFLAGS} -o ocamldumpobj <20>
|
1999-11-15 08:51:05 -08:00
|
|
|
|
misc.cmo formatmsg.cmo tbl.cmo config.cmo ident.cmo opcodes.cmo <20>
|
|
|
|
|
{DUMPOBJ}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1999-11-29 11:04:28 -08:00
|
|
|
|
delete -i ocamldumpobj
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
2000-01-07 08:45:43 -08:00
|
|
|
|
install <EFBFBD><EFBFBD>
|
|
|
|
|
duplicate -y ocamldumpobj "{BINDIR}ocamldumpobj"
|
|
|
|
|
|
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>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
-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
|
|
|
|
|
|
1999-11-29 11:04:28 -08:00
|
|
|
|
#dumpapprox <20> dumpapprox.cmo
|
|
|
|
|
# {CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
|
|
|
|
|
#
|
|
|
|
|
#clean <20><>
|
|
|
|
|
# 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
|
1999-11-29 11:04:28 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {depdir}{default}.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
.cmi <EFBFBD> .mli
|
1999-11-29 11:04:28 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {depdir}{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
|
1999-11-08 11:03:57 -08:00
|
|
|
|
|
|
|
|
|
# Scan object files for required primitives
|
|
|
|
|
|
1999-11-29 11:04:28 -08:00
|
|
|
|
primreq <EFBFBD> primreq.cmo
|
|
|
|
|
{CAMLC} {LINKFLAGS} -o primreq config.cmo primreq.cmo
|
1999-11-08 11:03:57 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
|
|
|
|
delete -i primreq
|
1999-11-29 11:04:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Resources for keyword-coloring for MPW Shell
|
|
|
|
|
|
|
|
|
|
keywords <EFBFBD> keywords.r
|
1999-12-30 05:12:10 -08:00
|
|
|
|
rez -t rsrc -c RSED -o keywords keywords.r
|
1999-11-29 11:04:28 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
|
|
|
|
delete -i keywords
|