From fc313762a22ae8a5a5baed71dcd42bc52defc0e9 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Fri, 20 Apr 2007 12:24:44 +0000 Subject: [PATCH] fixed paths and prefixes of included files --- matita/matitaInit.ml | 11 +++++++---- matita/matitamakeLib.ml | 5 ++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/matita/matitaInit.ml b/matita/matitaInit.ml index 1df34c4a1..ad4992fc9 100644 --- a/matita/matitaInit.ml +++ b/matita/matitaInit.ml @@ -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 -> diff --git a/matita/matitamakeLib.ml b/matita/matitamakeLib.ml index 013d45b7a..471f26970 100644 --- a/matita/matitamakeLib.ml +++ b/matita/matitamakeLib.ml @@ -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 -- 2.39.2