From: Enrico Tassi Date: Fri, 20 Apr 2007 12:24:44 +0000 (+0000) Subject: fixed paths and prefixes of included files X-Git-Tag: make_still_working~6371 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=9b6dcaba2d824263fdb849abec9fcc34a7546b5f;p=helm.git fixed paths and prefixes of included files --- diff --git a/helm/software/matita/matitaInit.ml b/helm/software/matita/matitaInit.ml index 1df34c4a1..ad4992fc9 100644 --- a/helm/software/matita/matitaInit.ml +++ b/helm/software/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/helm/software/matita/matitamakeLib.ml b/helm/software/matita/matitamakeLib.ml index 013d45b7a..471f26970 100644 --- a/helm/software/matita/matitamakeLib.ml +++ b/helm/software/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