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:04:50 -08:00
|
|
|
|
CAMLC = ::boot:ocamlrun ::ocamlc -I ::stdlib: -I :KB: -I :Lex:
|
|
|
|
|
CAMLYACC = ::yacc:ocamlyacc
|
|
|
|
|
CAMLLEX = ::boot:ocamlrun ::lex:ocamllex
|
|
|
|
|
CAMLDEP = ::boot:ocamlrun ::tools:ocamldep
|
|
|
|
|
CAMLRUN = ::byterun:ocamlrun
|
|
|
|
|
|
|
|
|
|
BYTE_EXE = fib.byt takc.byt taku.byt sieve.byt quicksort.byt quicksort.fast.byt <20>
|
|
|
|
|
fft.byt fft.fast.byt soli.byt soli.fast.byt boyer.byt kb.byt <20>
|
1996-12-12 02:52:15 -08:00
|
|
|
|
nucleic.byt genlex.byt bdd.byt
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
1997-11-17 05:14:09 -08:00
|
|
|
|
all <EFBFBD> test
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
# KB
|
|
|
|
|
|
|
|
|
|
BYTE_KB = :KB:terms.cmo :KB:equations.cmo :KB:kb.cmo :KB:orderings.cmo <20>
|
|
|
|
|
:KB:kbmain.cmo
|
|
|
|
|
|
|
|
|
|
kb.byt <EFBFBD> {BYTE_KB}
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} {BYTE_KB} -o kb.byt
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
delete -i :KB:<3A>.cm[io] || set status 0
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
# Genlex
|
|
|
|
|
|
|
|
|
|
BYTE_GENLEX = :Lex:syntax.cmo :Lex:scan_aux.cmo :Lex:scanner.cmo <20>
|
|
|
|
|
:Lex:gram_aux.cmo :Lex:grammar.cmo :Lex:lexgen.cmo :Lex:output.cmo :Lex:main.cmo
|
|
|
|
|
|
|
|
|
|
genlex.byt <EFBFBD> {BYTE_GENLEX}
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} {BYTE_GENLEX} -o genlex.byt
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
delete -i :Lex:<3A>.cm[io] || set status 0
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
:Lex:grammar.mli <20> :Lex:grammar.ml
|
1997-05-19 08:42:21 -07:00
|
|
|
|
echo -n
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
:Lex:grammar.ml <20> :Lex:grammar.mly ::yacc:ocamlyacc
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLYACC} {YACCFLAGS} :Lex:grammar.mly
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
delete -i :Lex:grammar.ml :Lex:grammar.mli
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
beforedepend <20><> :Lex:grammar.ml :Lex:grammar.mli
|
|
|
|
|
|
|
|
|
|
:Lex:scanner.ml <20> :Lex:scanner.mll ::lex:ocamllex
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLLEX} :Lex:scanner.mll
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
delete -i :Lex:scanner.ml
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
beforedepend <20><> :Lex:scanner.ml
|
|
|
|
|
|
|
|
|
|
# Common rules
|
|
|
|
|
|
|
|
|
|
.byt <EFBFBD> .ml
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} -o {targdir}{default}.byt {depdir}{default}.ml
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
.fast.byt <EFBFBD> .ml
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} -unsafe -o {targdir}{default}.fast.byt {depdir}{default}.ml
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
.cmi <EFBFBD> .mli
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} -c {depdir}{default}.mli
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
.cmo <EFBFBD> .ml
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLC} -c {depdir}{default}.ml
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
{BYTE_EXE} {BYTE_KB} {BYTE_GENLEX} <20> ::ocamlc
|
|
|
|
|
{BYTE_EXE} <20> ::stdlib:stdlib.cma
|
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:11 -08:00
|
|
|
|
delete -i <20>.byt || set status 0
|
|
|
|
|
delete -i <20>.cm[io] || set status 0
|
|
|
|
|
directory :Moretest; domake clean; directory ::
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
# Regression test
|
|
|
|
|
|
|
|
|
|
test <EFBFBD> {BYTE_EXE}
|
1997-05-19 08:42:21 -07:00
|
|
|
|
for prog in `echo {BYTE_EXE} | streamedit -e '1 replace /.byt/ "" -c <20>'`
|
|
|
|
|
echo {prog}
|
|
|
|
|
if "`exists :Results:{prog}.runtest.Mac`"
|
|
|
|
|
:Results:{prog}.runtest.Mac test {CAMLRUN} {prog}.byt
|
|
|
|
|
else
|
|
|
|
|
{CAMLRUN} {prog}.byt > "{tempfolder}ocaml-test"
|
|
|
|
|
equal -d "{tempfolder}ocaml-test" :Results:{prog}.out
|
|
|
|
|
end
|
|
|
|
|
end
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
delete -i :Lex:testscanner.ml "{tempfolder}ocaml-test"
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
# Benchmark
|
|
|
|
|
|
|
|
|
|
bench <EFBFBD> {BYTE_EXE}
|
1997-05-19 08:42:21 -07:00
|
|
|
|
for prog in `echo {BYTE_EXE} | streamedit -e '1 replace /.byt/ "" -c <20>'`
|
|
|
|
|
echo {prog}
|
|
|
|
|
if "`exists :Results:{prog}.runtest.Mac`"
|
|
|
|
|
:Results:{prog}.runtest.Mac bench {CAMLRUN} {prog}.byt
|
|
|
|
|
else
|
|
|
|
|
time "{CAMLRUN} {prog}.byt <20>dev:null"
|
|
|
|
|
end
|
|
|
|
|
end
|
1996-11-02 10:04:50 -08:00
|
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
|
|
|
|
|
depend <EFBFBD> beforedepend
|
1997-05-19 08:42:21 -07:00
|
|
|
|
{CAMLDEP} -I :KB: -I :Lex: <20>.ml :KB:<3A>.mli :KB:<3A>.ml :Lex:<3A>.mli <20>
|
|
|
|
|
:Lex:<3A>.ml > Makefile.Mac.depend
|