aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/envars.ml
diff options
context:
space:
mode:
authorGravatar regisgia <regisgia@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-12-07 13:56:36 +0000
committerGravatar regisgia <regisgia@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-12-07 13:56:36 +0000
commit7b09d2539a3ffa66017f44d0fcf0ca67fc5bcb6b (patch)
tree991f74825a5b20c8505ceca2247bc47699d9a45b /lib/envars.ml
parent5912ff839c3b63e0b26fd406640d84eb2a1b2674 (diff)
* 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
Diffstat (limited to 'lib/envars.ml')
-rw-r--r--lib/envars.ml16
1 files changed, 11 insertions, 5 deletions
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"
+