summaryrefslogtreecommitdiff
path: root/toplevel/coqinit.ml
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <smimram@debian.org>2006-01-19 22:34:29 +0000
committerGravatar Samuel Mimram <smimram@debian.org>2006-01-19 22:34:29 +0000
commit018ee3b0c2be79eb81b1f65c3f3fa142d24129c8 (patch)
treefbb91e2f74c73bb867ab62c58f248a704bbe6dec /toplevel/coqinit.ml
parent6497f27021fec4e01f2182014f2bb1989b4707f9 (diff)
Imported Upstream version 8.0pl3upstream/8.0pl3
Diffstat (limited to 'toplevel/coqinit.ml')
-rw-r--r--toplevel/coqinit.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/toplevel/coqinit.ml b/toplevel/coqinit.ml
index 4a4f7828..4ba8f6c2 100644
--- a/toplevel/coqinit.ml
+++ b/toplevel/coqinit.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: coqinit.ml,v 1.30.2.1 2004/07/16 19:31:47 herbelin Exp $ *)
+(* $Id: coqinit.ml,v 1.30.2.4 2006/01/11 23:18:06 barras Exp $ *)
open Pp
open System
@@ -68,16 +68,15 @@ let hm2 s =
let n = String.length s in
if n > 1 && s.[0] = '.' && s.[1] = '/' then String.sub s 2 (n-2) else s
-let getenv_else s dft = try Sys.getenv s with Not_found -> dft
-
(* Initializes the LoadPath according to COQLIB and Coq_config *)
let init_load_path () =
(* developper specific directories to open *)
let dev = if Coq_config.local then [ "dev" ] else [] in
let coqlib =
- if Coq_config.local || !Options.boot then Coq_config.coqtop
+ if !Options.boot then Coq_config.coqtop
(* variable COQLIB overrides the default library *)
else getenv_else "COQLIB" Coq_config.coqlib in
+ let coqlib = canonical_path_name coqlib in
(* first user-contrib *)
let user_contrib = coqlib/"user-contrib" in
if Sys.file_exists user_contrib then
@@ -90,6 +89,7 @@ let init_load_path () =
(if !Options.v7 then "states7" else "states") :: dev @ vdirs in
List.iter (fun s -> coq_add_rec_path (coqlib/s)) dirs;
let camlp4 = getenv_else "CAMLP4LIB" Coq_config.camlp4lib in
+ let camlp4 = canonical_path_name camlp4 in
add_ml_include camlp4;
(* then current directory *)
Mltop.add_path "." Nameops.default_root_prefix;