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
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 ->
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