From c09f706392d4a15d78bbe216dc0b5b7c8d41a1f8 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 27 Sep 2006 14:25:10 +0000 Subject: [PATCH] fixed bug regarding developments. paths given with -I are now made absolute --- helm/software/matita/matitaInit.ml | 8 ++++++-- helm/software/matita/matitaScript.ml | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/helm/software/matita/matitaInit.ml b/helm/software/matita/matitaInit.ml index a2a5b93fa..1df34c4a1 100644 --- a/helm/software/matita/matitaInit.ml +++ b/helm/software/matita/matitaInit.ml @@ -219,6 +219,9 @@ let parse_cmdline init_status = BuildTimeConf.stdlib_dir_devel; BuildTimeConf.stdlib_dir_installed ; ] in + let absolutize s = + if Pcre.pmatch ~pat:"^/" s then s else Sys.getcwd() ^"/"^s + in let args = ref [] in let add_l l = fun s -> l := s :: !l in let reduce_verbosity () = @@ -273,11 +276,12 @@ 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:(List.rev l) in Arg.parse arg_spec (add_l args) (usage ()); + let includes = List.map absolutize !includes in set_list ~key:"matita.includes" includes; - args := List.filter (fun x -> x <> "") !args; + let args = 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/matitaScript.ml b/helm/software/matita/matitaScript.ml index 5ddfb2b9c..718ea7a23 100644 --- a/helm/software/matita/matitaScript.ml +++ b/helm/software/matita/matitaScript.ml @@ -129,11 +129,11 @@ let wrap_with_developments guistuff f arg = (ActionCancelled ("Internal error: "^f_pwd^" exists but I'm unable to include it!")) in - let handle_with_devel d lexiconfile exc = + let handle_with_devel d lexiconfile mafile exc = let name = MatitamakeLib.name_for_development d in let title = "Unable to include " ^ lexiconfile in let message = - lexiconfile ^ " is handled by development " ^ name ^ ".\n\n" ^ + mafile ^ " is handled by development " ^ name ^ ".\n\n" ^ "Should I compile it and Its dependencies?" in (match guistuff.ask_confirmation ~title ~message with @@ -170,7 +170,7 @@ let wrap_with_developments guistuff f arg = * but was unable to get the compilation output 'xfilename' *) match MatitamakeLib.development_for_dir (Filename.dirname mafilename) with | None -> handle_without_devel mafilename exn - | Some d -> handle_with_devel d xfilename exn + | Some d -> handle_with_devel d xfilename mafilename exn ;; let eval_with_engine -- 2.39.2