]> matita.cs.unibo.it Git - helm.git/commitdiff
fixed paths and prefixes of included files
authorEnrico Tassi <enrico.tassi@inria.fr>
Fri, 20 Apr 2007 12:24:44 +0000 (12:24 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Fri, 20 Apr 2007 12:24:44 +0000 (12:24 +0000)
matita/matitaInit.ml
matita/matitamakeLib.ml

index 1df34c4a1de2a066c9af182ca3b0a8339fda360c..ad4992fc967d1ea8fa3f1111923a76a9f15d8227 100644 (file)
@@ -215,7 +215,9 @@ let add_cmdline_spec l = extra_cmdline_specs := l @ !extra_cmdline_specs
 
 let parse_cmdline init_status =
   if not (already_configured [CmdLine] init_status) then begin
-    let includes = ref [ 
+    let includes = ref [] in
+    let default_includes = [ 
+      ".";
       BuildTimeConf.stdlib_dir_devel;
       BuildTimeConf.stdlib_dir_installed ; ] 
     in
@@ -276,12 +278,13 @@ let parse_cmdline init_status =
       std_arg_spec @ debug_arg_spec @ !extra_cmdline_specs
     in
     let set_list ~key l =
-      Helm_registry.set_list Helm_registry.of_string ~key ~value:(List.rev l)
+      Helm_registry.set_list Helm_registry.of_string ~key ~value:l
     in
     Arg.parse arg_spec (add_l args) (usage ());
-    let includes = List.map absolutize !includes in
+    let includes = 
+      List.map absolutize ((List.rev !includes) @ default_includes) in
     set_list ~key:"matita.includes" includes;
-    let args = List.filter (fun x -> x <> "") !args in
+    let args = List.rev (List.filter (fun x -> x <> "") !args) in
     set_list ~key:"matita.args" args;
     HExtlib.set_profiling_printings 
       (fun s -> 
index 013d45b7a8a8fd4687386d0f73490cb8e31aa361..471f26970f403f6470d6c61c59c5d7519b0e44c1 100644 (file)
@@ -96,12 +96,11 @@ let development_for_dir dir =
       false
     else
       let pref = String.sub d2 0 len1 in
-      pref = d1
+      pref = d1 && d2.[len1] = '/'
   in
-  (* it must be unique *)
   try
     Some (List.find (fun d -> is_prefix_of d.root dir) !developments)
-  with Not_found -> None
+  with Not_found | Failure _ -> None
 
 let development_for_name name =
   try