aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2014-10-06 18:53:58 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2014-10-06 18:53:58 +0200
commit64faa3f42647da25c69941053211492b7f74a35d (patch)
treef84d1fac316cf8c31427c3840c76eeb61f7ad8dc
parenta2bed030e01bfe6e3addbe44f724de5c5fbeab65 (diff)
downloadcompcert-kvx-64faa3f42647da25c69941053211492b7f74a35d.tar.gz
compcert-kvx-64faa3f42647da25c69941053211492b7f74a35d.zip
Removed environment variable for the stdlib_path and added a new variable for the configuration file.
-rw-r--r--driver/Configuration.ml26
-rw-r--r--driver/Driver.ml6
-rw-r--r--driver/Timing.ml8
3 files changed, 20 insertions, 20 deletions
diff --git a/driver/Configuration.ml b/driver/Configuration.ml
index c4bcf278..1956b151 100644
--- a/driver/Configuration.ml
+++ b/driver/Configuration.ml
@@ -18,18 +18,22 @@ let config_vars: (string, string) Hashtbl.t = Hashtbl.create 10
let _ =
try
let file =
- let dir = Sys.getcwd ()
- and name = Sys.argv.(0) in
- let dirname = if Filename.is_relative name then
- Filename.dirname (Filename.concat dir name)
- else
- Filename.dirname name
- in
- let share_dir = Filename.concat (Filename.concat dirname Filename.parent_dir_name) "share" in
try
- open_in (Filename.concat dirname "compcert.ini")
- with Sys_error _ ->
- open_in (Filename.concat share_dir "compcert.ini")
+ let env_file = Sys.getenv "COMPCERT_CONFIG" in
+ open_in env_file
+ with Not_found ->
+ let dir = Sys.getcwd ()
+ and name = Sys.argv.(0) in
+ let dirname = if Filename.is_relative name then
+ Filename.dirname (Filename.concat dir name)
+ else
+ Filename.dirname name
+ in
+ let share_dir = Filename.concat (Filename.concat dirname Filename.parent_dir_name) "share" in
+ try
+ open_in (Filename.concat dirname "compcert.ini")
+ with Sys_error _ ->
+ open_in (Filename.concat share_dir "compcert.ini")
in
(try
let ini_line = Str.regexp "\\([^=]+\\)=\\(.+\\)" in
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 7dacc4d2..18005302 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -17,11 +17,7 @@ open Timing
(* Location of the compatibility library *)
-let stdlib_path = ref(
- try
- Sys.getenv "COMPCERT_LIBRARY"
- with Not_found ->
- Configuration.stdlib_path)
+let stdlib_path = ref Configuration.stdlib_path
let command cmd =
if !option_v then begin
diff --git a/driver/Timing.ml b/driver/Timing.ml
index b45dad40..f660e9c7 100644
--- a/driver/Timing.ml
+++ b/driver/Timing.ml
@@ -2,11 +2,11 @@
(* *)
(* The Compcert verified compiler *)
(* *)
-(* Bernhard Schommer, AbsInt Angewandte Informatik GmbH *)
+(* Xavier Leroy, INRIA Paris-Rocquencourt *)
(* *)
-(* AbsInt Angewandte Informatik GmbH. All rights reserved. This file *)
-(* is distributed under the terms of the INRIA Non-Commercial *)
-(* License Agreement. *)
+(* Copyright Institut National de Recherche en Informatique et en *)
+(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)