From b2b4e85ec6607d7364a0da9c65ae9303b9f73c03 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 4 Jan 2017 14:35:51 +0100 Subject: Usage.print_config moved to Envars --- toplevel/coqtop.ml | 2 +- toplevel/usage.ml | 13 ------------- toplevel/usage.mli | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) (limited to 'toplevel') diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 41d370ea57..4237ef3601 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -620,7 +620,7 @@ let init_toplevel arglist = Spawned.init_channels (); Envars.set_coqlib ~fail:CErrors.error; if !print_where then (print_endline(Envars.coqlib ()); exit(exitcode ())); - if !print_config then (Usage.print_config (); exit (exitcode ())); + if !print_config then (Envars.print_config stdout; exit (exitcode ())); if !print_tags then (print_style_tags (); exit (exitcode ())); if !filter_opts then (print_string (String.concat "\n" extras); exit 0); init_load_path (); diff --git a/toplevel/usage.ml b/toplevel/usage.ml index e290480354..67701d73ea 100644 --- a/toplevel/usage.ml +++ b/toplevel/usage.ml @@ -115,16 +115,3 @@ let print_usage_coqc () = flush stderr ; exit 1 -(* Print the configuration information *) - -let print_config () = - if Coq_config.local then Printf.printf "LOCAL=1\n" else Printf.printf "LOCAL=0\n"; - Printf.printf "COQLIB=%s/\n" (Envars.coqlib ()); - Printf.printf "DOCDIR=%s/\n" (Envars.docdir ()); - Printf.printf "OCAMLFIND=%s\n" (Envars.ocamlfind ()); - Printf.printf "CAMLP4=%s\n" Coq_config.camlp4; - Printf.printf "CAMLP4O=%s\n" Coq_config.camlp4o; - Printf.printf "CAMLP4BIN=%s/\n" (Envars.camlp4bin ()); - Printf.printf "CAMLP4LIB=%s\n" (Envars.camlp4lib ()); - Printf.printf "CAMLP4OPTIONS=%s\n" Coq_config.camlp4compat; - Printf.printf "HASNATDYNLINK=%s\n" (if Coq_config.has_natdynlink then "true" else "false") diff --git a/toplevel/usage.mli b/toplevel/usage.mli index dccb40e713..c46c7a79c0 100644 --- a/toplevel/usage.mli +++ b/toplevel/usage.mli @@ -21,5 +21,3 @@ val add_to_usage : string -> string -> unit val print_usage_coqtop : unit -> unit val print_usage_coqc : unit -> unit -(** {6 Prints the configuration information } *) -val print_config : unit -> unit -- cgit v1.2.3 From 11ec801fa17434b0a3aad2c88a4422a22f1c4c44 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 4 Jan 2017 14:46:52 +0100 Subject: Put the list of Coq sources subdirectories in one place and avoid duplication --- toplevel/coqinit.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'toplevel') diff --git a/toplevel/coqinit.ml b/toplevel/coqinit.ml index 2b9a04dad8..8fca302687 100644 --- a/toplevel/coqinit.ml +++ b/toplevel/coqinit.ml @@ -121,14 +121,10 @@ let init_library_roots () = find the "include" file in the *source* directory *) let init_ocaml_path () = let add_subdir dl = - Mltop.add_ml_dir (List.fold_left (/) Envars.coqroot dl) + Mltop.add_ml_dir (List.fold_left (/) Envars.coqroot [dl]) in Mltop.add_ml_dir (Envars.coqlib ()); - List.iter add_subdir - [ [ "config" ]; [ "dev" ]; [ "lib" ]; [ "kernel" ]; [ "library" ]; - [ "engine" ]; [ "pretyping" ]; [ "interp" ]; [ "parsing" ]; [ "proofs" ]; - [ "tactics" ]; [ "toplevel" ]; [ "printing" ]; [ "intf" ]; - [ "grammar" ]; [ "ide" ]; [ "ltac" ]; [ "vernac" ]; ] + List.iter add_subdir Envars.coq_src_subdirs let get_compat_version = function | "8.7" -> Flags.Current -- cgit v1.2.3 From 577f6d0e5c4eecca3a3cd46dfc37084123f4adf6 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 5 Jan 2017 16:57:58 +0100 Subject: Document --print-version in Usage --- toplevel/usage.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toplevel') diff --git a/toplevel/usage.ml b/toplevel/usage.ml index 67701d73ea..c43f0ff058 100644 --- a/toplevel/usage.ml +++ b/toplevel/usage.ml @@ -56,7 +56,8 @@ let print_usage_channel co command = \n\ \n -where print Coq's standard library location and exit\ \n -config, --config print Coq's configuration information and exit\ -\n -v print Coq version and exit\ +\n -v, --version print Coq version and exit\ +\n --print-version print Coq version in easy to parse format and exit\ \n -list-tags print highlight color tags known by Coq and exit\ \n\ \n -quiet unset display of extra information (implies -w \"-all\")\ -- cgit v1.2.3