From 7b09d2539a3ffa66017f44d0fcf0ca67fc5bcb6b Mon Sep 17 00:00:00 2001 From: regisgia Date: Fri, 7 Dec 2012 13:56:36 +0000 Subject: * lib/Envars: - Document interface file. - Now export references to ocaml compilers used to compile Coq. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16030 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/envars.ml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/envars.ml') diff --git a/lib/envars.ml b/lib/envars.ml index 27579e4ea..d8002316e 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -163,13 +163,18 @@ let camlbin () = if !Flags.boot then Coq_config.camlbin else try guess_camlbin () with _ -> Coq_config.camlbin +let in_caml_bin s = Filename.concat (camlbin ()) s + +let ocamlc () = in_caml_bin Coq_config.ocamlc + +let ocamlopt () = in_caml_bin Coq_config.ocamlopt + let camllib () = - if !Flags.boot - then Coq_config.camllib + if !Flags.boot then + Coq_config.camllib else - let camlbin = camlbin () in - let com = (Filename.concat camlbin "ocamlc") ^ " -where" in - let _,res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in + let com = ocamlc () ^ " -where" in + let _, res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in Util.String.strip res let camlp4bin () = @@ -189,3 +194,4 @@ let camlp4lib () = match ex with |Unix.WEXITED 0 -> Util.String.strip res |_ -> "/dev/null" + -- cgit v1.2.3