aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/usage.ml
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2016-06-16 14:05:11 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2016-06-16 14:23:56 +0200
commit01847d2c992b05af5ed477ec7a208064526b0c5f (patch)
tree8b91c2fa969205e0bb151f49c7432f78e58ddefb /toplevel/usage.ml
parent7ded7df853fd0485822f2a9c79207352af5dca38 (diff)
--print-version produces machine readable version info
What one needs to know in 3rd party makefiles, like plugins ones, is the Coq version and the OCaml version number. This option prints the 2 values on a single line separated by spaces. The already existing --version outputs the same piece of info but in a format meant for user consumption, and hence harder to parse.
Diffstat (limited to 'toplevel/usage.ml')
-rw-r--r--toplevel/usage.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/toplevel/usage.ml b/toplevel/usage.ml
index ffbbe7ed4..8f77aea44 100644
--- a/toplevel/usage.ml
+++ b/toplevel/usage.ml
@@ -11,6 +11,10 @@ let version ret =
Coq_config.version Coq_config.date;
Printf.printf "compiled on %s with OCaml %s\n" Coq_config.compile_date Coq_config.caml_version;
exit ret
+let machine_readable_version ret =
+ Printf.printf "%s %s\n"
+ Coq_config.version Coq_config.caml_version;
+ exit ret
(* print the usage of coqtop (or coqc) on channel co *)