Commit f0982627 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-10-07 21:53:15 by cvscast] Beppe: now --compile generates a .cdo rather than .cd.out file

Original author: cvscast
Date: 2003-10-07 21:53:15+00:00
parent 3a4d7d68
......@@ -148,6 +148,7 @@ clean:
rm -f dtd2cduce pool webiface validate
rm -Rf prepro package
rm -f web/www/*.html web/*~
rm -f web/site.cdo
.SUFFIXES: .ml .mli .cmo .cmi .cmx
......@@ -171,7 +172,7 @@ include depend
driver/ cduce web/examples/ web/examples/examples.xml
(cd web/examples; ../../cduce --quiet --arg examples.xml)
webpages: cduce web/
webpages: cduce web/site.cdo
(cd web; ../cduce --run --arg site.xml)
web/ cduce web/
open Location
open Ident
(* retuns a filename without the suffix suff if any *)
let prefix filename suff =
if Filename.check_suffix filename suff then
Filename.chop_extension filename
with Invalid_argument filename -> failwith "Not a point in the suffix?"
else filename
let quiet = ref false
let toplevel = ref false
......@@ -318,7 +326,7 @@ let run_code argv codes =
let compile src =
let codes = comp_unit src in
let oc = open_out (src ^ ".out") in
let oc = open_out ((prefix src ".cd") ^ ".cdo") in
let codes_s = Lambda.Put.compunit codes in
output_string oc codes_s;
close_out oc;
......@@ -36,9 +36,9 @@ let specs =
"--quiet", Arg.Set Cduce.quiet,
" suppress normal output (typing, results)";
"--compile", Arg.Set compile,
" compilate the given CDuce file";
"compile the given CDuce file";
"--run", Arg.Set run,
" compilate the given CDuce file";
" execute the given CDuce object file";
"--stdin", Arg.Unit (fun () -> src := "" :: !src),
" read CDuce script on standard input";
"--verbose", Arg.Unit (fun () -> Stats.set_verbosity Stats.Summary),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment