Commit 7fc9cacd authored by Andre Maroneze's avatar Andre Maroneze 💬 Committed by Allan Blanchard
Browse files

[Kernel] add libdir/libdirs (as FRAMAC_LIB)

parent 0fd8cd32
......@@ -61,6 +61,9 @@ let dump_to_json () =
"framac_libc", `String (Fc_config.framac_libc:>string) ;
"plugin_dir",
list string (Filepath.Normalized.to_string_list Fc_config.plugin_dir) ;
"lib_dir", `String (Fc_config.libdir:>string) ;
"lib_dirs",
list string (Filepath.Normalized.to_string_list Fc_config.libdirs) ;
"preprocessor", `String Fc_config.preprocessor ;
"using_default_cpp", `Bool Fc_config.using_default_cpp ;
"preprocessor_is_gnu_like", `Bool Fc_config.preprocessor_is_gnu_like ;
......
......@@ -35,6 +35,9 @@ let is_gui = Frama_c_very_first.Gui_init.is_gui
let datadirs = (List.map Filepath.Normalized.of_string Config_data.Sites.share)
let datadir = List.hd (List.rev datadirs)
let libdirs = (List.map Filepath.Normalized.of_string Config_data.Sites.lib)
let libdir = List.hd (List.rev libdirs)
let plugin_dir = List.map Filepath.Normalized.of_string Config_data.Sites.plugins
let plugin_path =
......
......@@ -61,6 +61,15 @@ val framac_libc: Filepath.Normalized.t
(** Directory where Frama-C libc headers are.
@since 19.0-Potassium *)
val libdirs: Filepath.Normalized.t list
(** Directories where library and executable files are, in order of
priority.
@since Frama-C+dev *)
val libdir: Filepath.Normalized.t
(** Last directory of libdirs (the directory of frama-c installation)
@since Frama-C+dev *)
val plugin_dir: Filepath.Normalized.t list
(** Directory where the Frama-C dynamic plug-ins are. *)
......
......@@ -31,10 +31,12 @@ let print_config () =
"Frama-C %s@\n\
Environment:@\n \
FRAMAC_SHARE = %S@\n \
FRAMAC_PLUGIN = %S%t@."
FRAMAC_PLUGIN = %S@\n \
FRAMAC_LIB = %S%t@."
Fc_config.version_and_codename
(String.concat ":" (Filepath.Normalized.to_string_list Fc_config.datadirs))
(String.concat ":" (Filepath.Normalized.to_string_list Fc_config.plugin_dir))
(String.concat ":" (Filepath.Normalized.to_string_list Fc_config.libdirs))
(fun fmt ->
if Fc_config.preprocessor = "" then
Format.fprintf fmt "@\nWarning: no default pre-processor"
......@@ -67,7 +69,7 @@ let () = Cmdline.run_after_early_stage print_version
let print_sharepath = print_configl Kernel.PrintShare.get Fc_config.datadirs
let () = Cmdline.run_after_early_stage print_sharepath
let print_libpath = print_configl Kernel.PrintLib.get Fc_config.plugin_dir
let print_libpath = print_configl Kernel.PrintLib.get [Fc_config.libdir]
let () = Cmdline.run_after_early_stage print_libpath
let print_pluginpath =
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment