Skip to content
Snippets Groups Projects
Commit 57b73127 authored by Allan Blanchard's avatar Allan Blanchard Committed by Andre Maroneze
Browse files

[kernel] introduce paths in system_config

parent 186e08c8
No related branches found
No related tags found
No related merge requests found
...@@ -34,9 +34,9 @@ let print_config () = ...@@ -34,9 +34,9 @@ let print_config () =
FRAMAC_PLUGIN = %S@\n \ FRAMAC_PLUGIN = %S@\n \
FRAMAC_LIB = %S%t@." FRAMAC_LIB = %S%t@."
System_config.Version.id_and_codename System_config.Version.id_and_codename
(String.concat ":" (Filepath.Normalized.to_string_list System_config.Share.dirs)) (System_config.Share.path)
(String.concat ":" (Filepath.Normalized.to_string_list System_config.Plugins.dirs)) (System_config.Plugins.path)
(String.concat ":" (Filepath.Normalized.to_string_list System_config.Lib.dirs)) (System_config.Lib.path)
(fun fmt -> (fun fmt ->
if System_config.Preprocessor.command = "" then if System_config.Preprocessor.command = "" then
Format.fprintf fmt "@\nWarning: no default preprocessor" Format.fprintf fmt "@\nWarning: no default preprocessor"
......
...@@ -34,6 +34,7 @@ let is_gui = Frama_c_very_first.Gui_init.is_gui ...@@ -34,6 +34,7 @@ let is_gui = Frama_c_very_first.Gui_init.is_gui
module Share = struct module Share = struct
let dirs = List.map Filepath.Normalized.of_string Config_data.Sites.share let dirs = List.map Filepath.Normalized.of_string Config_data.Sites.share
let path = String.concat ":" (Filepath.Normalized.to_string_list dirs)
let main = List.hd (List.rev dirs) let main = List.hd (List.rev dirs)
let libc = Filepath.Normalized.concat main "libc" let libc = Filepath.Normalized.concat main "libc"
...@@ -42,6 +43,7 @@ end ...@@ -42,6 +43,7 @@ end
module Lib = struct module Lib = struct
let dirs = List.map Filepath.Normalized.of_string Config_data.Sites.lib let dirs = List.map Filepath.Normalized.of_string Config_data.Sites.lib
let path = String.concat ":" (Filepath.Normalized.to_string_list dirs)
let main = List.hd (List.rev dirs) let main = List.hd (List.rev dirs)
end end
......
...@@ -48,6 +48,9 @@ module Share : sig ...@@ -48,6 +48,9 @@ module Share : sig
val main: Filepath.Normalized.t val main: Filepath.Normalized.t
(** Last directory of dirs (the directory of frama-c installation) *) (** Last directory of dirs (the directory of frama-c installation) *)
val path: string
(** The colon-separated concatenation of {!dirs}. *)
val libc: Filepath.Normalized.t val libc: Filepath.Normalized.t
(** Directory where Frama-C libc headers are. *) (** Directory where Frama-C libc headers are. *)
end end
...@@ -57,6 +60,9 @@ module Lib : sig ...@@ -57,6 +60,9 @@ module Lib : sig
(** Directories where library and executable files are, in order of (** Directories where library and executable files are, in order of
priority. *) priority. *)
val path: string
(** The colon-separated concatenation of {!dirs}. *)
val main: Filepath.Normalized.t val main: Filepath.Normalized.t
(** Last directory of libdirs (the directory of frama-c installation) *) (** Last directory of libdirs (the directory of frama-c installation) *)
end end
...@@ -66,7 +72,7 @@ module Plugins : sig ...@@ -66,7 +72,7 @@ module Plugins : sig
(** Directories where the Frama-C dynamic plug-ins are. *) (** Directories where the Frama-C dynamic plug-ins are. *)
val path: string val path: string
(** The colon-separated concatenation of [plugin_dir]. *) (** The colon-separated concatenation of {!dirs}. *)
val load: string -> unit val load: string -> unit
(** Load given plug-in name *) (** Load given plug-in name *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment