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

[r2003-05-25 13:33:40 by cvscast] cduce_config

Original author: cvscast
Date: 2003-05-25 13:33:41+00:00
parent 79e8bf0f
...@@ -11,6 +11,8 @@ endif ...@@ -11,6 +11,8 @@ endif
SYNTAX = camlp4o pa_extend.cmo SYNTAX = camlp4o pa_extend.cmo
VERSION = 0.0.9 (alpha)
ifeq ($(PROFILE), true) ifeq ($(PROFILE), true)
CAMLC_P = ocamlcp -p a CAMLC_P = ocamlcp -p a
CAMLOPT_P = ocamlopt -p CAMLOPT_P = ocamlopt -p
...@@ -70,7 +72,12 @@ INCLUDES = $(DIRS:%=-I %) ...@@ -70,7 +72,12 @@ INCLUDES = $(DIRS:%=-I %)
PREPRO = $(SYNTAX) pr_o.cmo PREPRO = $(SYNTAX) pr_o.cmo
cduce: $(CDUCE:.cmo=.$(EXTENSION)) cduce: $(CDUCE:.cmo=.$(EXTENSION))
$(LINK) -o $@ $^ sed -e 's|%%VERSION%%|$(VERSION)|' \
-e 's|%%BUILD_DATE%%|$(shell date -R)|' \
-e 's|%%NATIVE%%|$(NATIVE)|' \
misc/cduce_config.mlp > misc/cduce_config.ml
$(LINK) -o $@ misc/cduce_config.ml $^
rm misc/cduce_config.ml
webiface: $(WEBIFACE:.cmo=.$(EXTENSION)) webiface: $(WEBIFACE:.cmo=.$(EXTENSION))
$(LINK) -o $@ $^ $(LINK) -o $@ $^
......
...@@ -26,28 +26,26 @@ typing/typed.cmo: types/ident.cmo parser/location.cmi types/patterns.cmi \ ...@@ -26,28 +26,26 @@ typing/typed.cmo: types/ident.cmo parser/location.cmi types/patterns.cmi \
types/types.cmi runtime/value.cmi types/types.cmi runtime/value.cmi
typing/typed.cmx: types/ident.cmx parser/location.cmx types/patterns.cmx \ typing/typed.cmx: types/ident.cmx parser/location.cmx types/patterns.cmx \
types/types.cmx runtime/value.cmx types/types.cmx runtime/value.cmx
typing/typer.cmo: parser/ast.cmo types/atoms.cmi types/ident.cmo \ typing/typer.cmo: parser/ast.cmo types/ident.cmo parser/location.cmi \
types/intervals.cmi parser/location.cmi types/patterns.cmi \ types/patterns.cmi types/sequence.cmi misc/state.cmi typing/typed.cmo \
types/sequence.cmi misc/state.cmi typing/typed.cmo types/types.cmi \ types/types.cmi typing/typer.cmi
typing/typer.cmi typing/typer.cmx: parser/ast.cmx types/ident.cmx parser/location.cmx \
typing/typer.cmx: parser/ast.cmx types/atoms.cmx types/ident.cmx \ types/patterns.cmx types/sequence.cmx misc/state.cmx typing/typed.cmx \
types/intervals.cmx parser/location.cmx types/patterns.cmx \ types/types.cmx typing/typer.cmi
types/sequence.cmx misc/state.cmx typing/typed.cmx types/types.cmx \
typing/typer.cmi
types/atoms.cmo: misc/encodings.cmi misc/pool.cmi types/sortedList.cmi \ types/atoms.cmo: misc/encodings.cmi misc/pool.cmi types/sortedList.cmi \
types/atoms.cmi types/atoms.cmi
types/atoms.cmx: misc/encodings.cmx misc/pool.cmx types/sortedList.cmx \ types/atoms.cmx: misc/encodings.cmx misc/pool.cmx types/sortedList.cmx \
types/atoms.cmi types/atoms.cmi
types/boolean.cmo: types/sortedList.cmi types/boolean.cmi types/boolean.cmo: types/sortedList.cmi types/boolean.cmi
types/boolean.cmx: types/sortedList.cmx types/boolean.cmi types/boolean.cmx: types/sortedList.cmx types/boolean.cmi
types/builtin.cmo: types/atoms.cmi types/chars.cmi runtime/eval.cmi \ types/builtin.cmo: parser/ast.cmo types/atoms.cmi types/chars.cmi \
types/ident.cmo runtime/load_xml.cmi parser/location.cmi \ types/ident.cmo types/intervals.cmi runtime/load_xml.cmi \
runtime/print_xml.cmo types/sequence.cmi typing/typer.cmi types/types.cmi \ parser/location.cmi runtime/print_xml.cmo types/sequence.cmi \
runtime/value.cmi typing/typed.cmo typing/typer.cmi types/types.cmi runtime/value.cmi
types/builtin.cmx: types/atoms.cmx types/chars.cmx runtime/eval.cmx \ types/builtin.cmx: parser/ast.cmx types/atoms.cmx types/chars.cmx \
types/ident.cmx runtime/load_xml.cmx parser/location.cmx \ types/ident.cmx types/intervals.cmx runtime/load_xml.cmx \
runtime/print_xml.cmx types/sequence.cmx typing/typer.cmx types/types.cmx \ parser/location.cmx runtime/print_xml.cmx types/sequence.cmx \
runtime/value.cmx typing/typed.cmx typing/typer.cmx types/types.cmx runtime/value.cmx
types/chars.cmo: types/chars.cmi types/chars.cmo: types/chars.cmi
types/chars.cmx: types/chars.cmi types/chars.cmx: types/chars.cmi
types/ident.cmo: misc/encodings.cmi misc/pool.cmi types/sortedList.cmi types/ident.cmo: misc/encodings.cmi misc/pool.cmi types/sortedList.cmi
...@@ -72,14 +70,12 @@ types/types.cmo: types/atoms.cmi misc/bool.cmi types/chars.cmi \ ...@@ -72,14 +70,12 @@ types/types.cmo: types/atoms.cmi misc/bool.cmi types/chars.cmi \
types/types.cmx: types/atoms.cmx misc/bool.cmx types/chars.cmx \ types/types.cmx: types/atoms.cmx misc/bool.cmx types/chars.cmx \
misc/encodings.cmx types/ident.cmx types/intervals.cmx types/normal.cmx \ misc/encodings.cmx types/ident.cmx types/intervals.cmx types/normal.cmx \
misc/pretty.cmx types/sortedList.cmx misc/state.cmx types/types.cmi misc/pretty.cmx types/sortedList.cmx misc/state.cmx types/types.cmi
runtime/eval.cmo: types/atoms.cmi types/ident.cmo types/intervals.cmi \ runtime/eval.cmo: types/ident.cmo types/patterns.cmi runtime/run_dispatch.cmi \
runtime/load_xml.cmi parser/location.cmi types/patterns.cmi \ misc/state.cmi typing/typed.cmo types/types.cmi runtime/value.cmi \
runtime/print_xml.cmo runtime/run_dispatch.cmi misc/state.cmi \ runtime/eval.cmi
typing/typed.cmo types/types.cmi runtime/value.cmi runtime/eval.cmi runtime/eval.cmx: types/ident.cmx types/patterns.cmx runtime/run_dispatch.cmx \
runtime/eval.cmx: types/atoms.cmx types/ident.cmx types/intervals.cmx \ misc/state.cmx typing/typed.cmx types/types.cmx runtime/value.cmx \
runtime/load_xml.cmx parser/location.cmx types/patterns.cmx \ runtime/eval.cmi
runtime/print_xml.cmx runtime/run_dispatch.cmx misc/state.cmx \
typing/typed.cmx types/types.cmx runtime/value.cmx runtime/eval.cmi
runtime/load_xml.cmo: types/atoms.cmi misc/encodings.cmi types/ident.cmo \ runtime/load_xml.cmo: types/atoms.cmi misc/encodings.cmi types/ident.cmo \
parser/location.cmi runtime/value.cmi runtime/load_xml.cmi parser/location.cmi runtime/value.cmi runtime/load_xml.cmi
runtime/load_xml.cmx: types/atoms.cmx misc/encodings.cmx types/ident.cmx \ runtime/load_xml.cmx: types/atoms.cmx misc/encodings.cmx types/ident.cmx \
...@@ -100,14 +96,14 @@ runtime/value.cmo: types/atoms.cmi types/chars.cmi misc/encodings.cmi \ ...@@ -100,14 +96,14 @@ runtime/value.cmo: types/atoms.cmi types/chars.cmi misc/encodings.cmi \
runtime/value.cmx: types/atoms.cmx types/chars.cmx misc/encodings.cmx \ runtime/value.cmx: types/atoms.cmx types/chars.cmx misc/encodings.cmx \
types/ident.cmx types/intervals.cmx types/sequence.cmx types/types.cmx \ types/ident.cmx types/intervals.cmx types/sequence.cmx types/types.cmx \
runtime/value.cmi runtime/value.cmi
driver/cduce.cmo: parser/ast.cmo types/builtin.cmo runtime/eval.cmi \ driver/cduce.cmo: parser/ast.cmo runtime/eval.cmi types/ident.cmo \
types/ident.cmo parser/location.cmi parser/parser.cmi types/patterns.cmi \ parser/location.cmi parser/parser.cmi types/patterns.cmi types/sample.cmi \
types/sample.cmi misc/state.cmi typing/typed.cmo typing/typer.cmi \ misc/state.cmi typing/typed.cmo typing/typer.cmi types/types.cmi \
types/types.cmi runtime/value.cmi parser/wlexer.cmo driver/cduce.cmi runtime/value.cmi parser/wlexer.cmo driver/cduce.cmi
driver/cduce.cmx: parser/ast.cmx types/builtin.cmx runtime/eval.cmx \ driver/cduce.cmx: parser/ast.cmx runtime/eval.cmx types/ident.cmx \
types/ident.cmx parser/location.cmx parser/parser.cmx types/patterns.cmx \ parser/location.cmx parser/parser.cmx types/patterns.cmx types/sample.cmx \
types/sample.cmx misc/state.cmx typing/typed.cmx typing/typer.cmx \ misc/state.cmx typing/typed.cmx typing/typer.cmx types/types.cmx \
types/types.cmx runtime/value.cmx parser/wlexer.cmx driver/cduce.cmi runtime/value.cmx parser/wlexer.cmx driver/cduce.cmi
driver/run.cmo: driver/cduce.cmi types/ident.cmo parser/location.cmi \ driver/run.cmo: driver/cduce.cmi types/ident.cmo parser/location.cmi \
types/sequence.cmi misc/state.cmi runtime/value.cmi parser/wlexer.cmo types/sequence.cmi misc/state.cmi runtime/value.cmi parser/wlexer.cmo
driver/run.cmx: driver/cduce.cmx types/ident.cmx parser/location.cmx \ driver/run.cmx: driver/cduce.cmx types/ident.cmx parser/location.cmx \
...@@ -117,8 +113,8 @@ driver/webiface.cmo: driver/cduce.cmi driver/examples.cmo parser/location.cmi \ ...@@ -117,8 +113,8 @@ driver/webiface.cmo: driver/cduce.cmi driver/examples.cmo parser/location.cmi \
driver/webiface.cmx: driver/cduce.cmx driver/examples.cmx parser/location.cmx \ driver/webiface.cmx: driver/cduce.cmx driver/examples.cmx parser/location.cmx \
misc/state.cmx misc/state.cmx
parser/parser.cmi: parser/ast.cmo parser/parser.cmi: parser/ast.cmo
typing/typer.cmi: parser/ast.cmo types/ident.cmo typing/typed.cmo \ typing/typer.cmi: parser/ast.cmo types/ident.cmo parser/location.cmi \
types/types.cmi typing/typed.cmo types/types.cmi
types/atoms.cmi: misc/encodings.cmi types/atoms.cmi: misc/encodings.cmi
types/boolean.cmi: types/sortedList.cmi types/boolean.cmi: types/sortedList.cmi
types/patterns.cmi: types/atoms.cmi types/chars.cmi types/ident.cmo \ types/patterns.cmi: types/atoms.cmi types/chars.cmi types/ident.cmo \
......
open Location open Location
open Ident open Ident
let version = "0.0.9 (alpha)"
let quiet = ref false let quiet = ref false
let typing_env = State.ref "Cduce.typing_env" Env.empty let typing_env = State.ref "Cduce.typing_env" Env.empty
......
val version: string
val quiet: bool ref val quiet: bool ref
val print_exn: Format.formatter -> exn -> unit val print_exn: Format.formatter -> exn -> unit
......
...@@ -6,18 +6,21 @@ let dump = ref None ...@@ -6,18 +6,21 @@ let dump = ref None
let src = ref [] let src = ref []
let args = ref [] let args = ref []
let version () =
Printf.eprintf "CDuce, version %s\n" Cduce_config.version;
Printf.eprintf "built on %s\n" Cduce_config.build_date;
Printf.eprintf "using OCaml %s compiler\n"
(if Cduce_config.native then "native" else "bytecode");
exit 0
let specs = let specs =
[ "--dump", Arg.String (fun s -> dump := Some s), [ "--dump", Arg.String (fun s -> dump := Some s),
" specify filename for persistency"; " specify filename for persistency";
"--quiet", Arg.Set Cduce.quiet, "--quiet", Arg.Set Cduce.quiet,
" suppress normal output (typing, results)"; " suppress normal output (typing, results)";
"-v", Arg.Unit (fun () -> "-v", Arg.Unit version,
Printf.eprintf "CDuce, version %s\n"
Cduce.version; exit 0),
" print CDuce version"; " print CDuce version";
"--version", Arg.Unit (fun () -> "--version", Arg.Unit version,
Printf.eprintf "CDuce, version %s\n"
Cduce.version; exit 0),
"print CDuce version"; "print CDuce version";
"--license", Arg.Unit (fun () -> "--license", Arg.Unit (fun () ->
Printf.eprintf "\n\ Printf.eprintf "\n\
...@@ -80,8 +83,8 @@ let main () = ...@@ -80,8 +83,8 @@ let main () =
(match !src with (match !src with
| [] -> | [] ->
Format.fprintf ppf Format.fprintf ppf
"CDuce %s\nNo script specified; using stdin ...@." "CDuce version %s\nNo script specified; using stdin ...@."
Cduce.version; Cduce_config.version;
do_file "" do_file ""
| l -> List.iter do_file l); | l -> List.iter do_file l);
(match !dump with (match !dump with
......
let version = "%%VERSION%%"
let build_date = "%%BUILD_DATE%%"
let build_host = "%%BUILD_HOST%%"
let native = %%NATIVE%%
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