aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/usage.ml
diff options
context:
space:
mode:
Diffstat (limited to 'toplevel/usage.ml')
-rw-r--r--toplevel/usage.ml17
1 files changed, 15 insertions, 2 deletions
diff --git a/toplevel/usage.ml b/toplevel/usage.ml
index cdb3b6f02..b411a4f96 100644
--- a/toplevel/usage.ml
+++ b/toplevel/usage.ml
@@ -8,9 +8,22 @@
(* $Id$ *)
+let get_version_date () =
+ try
+ let ch = open_in (Coq_config.coqsrc^"/revision") in
+ let ver = input_line ch in
+ let rev = input_line ch in
+ (ver,rev)
+ with _ -> (Coq_config.version,Coq_config.date)
+
+let print_header () =
+ let (ver,rev) = (get_version_date ()) in
+ Printf.printf "Welcome to Coq %s (%s)\n" ver rev;
+ flush stdout
+
let version () =
- Printf.printf "The Coq Proof Assistant, version %s (%s)\n"
- Coq_config.version Coq_config.date;
+ let (ver,rev) = (get_version_date ()) in
+ Printf.printf "The Coq Proof Assistant, version %s (%s)\n" ver rev;
Printf.printf "compiled on %s\n" Coq_config.compile_date;
exit 0