Skip to content
Snippets Groups Projects
Commit 132a1602 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[kernel] compile script against appropriate lablgtk library when in GUI mode

parent 59ff427b
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,9 @@ MINOR_VERSION=$(shell $(SED) -E 's/^[0-9]+\.([0-9]+).*/\1/' VERSION)
$(CONFIG_FILE): $(CONFIG_FILE).in VERSION VERSION_CODENAME share/Makefile.config Makefile.generating configure.in
$(SED) \
-e "s|@VERSION@|$(VERSION)|" \
-e "s|@VERSION_CODENAME@|$(VERSION_CODENAME)|" \
-e "s|@VERSION_CODENAME@|$(VERSION_CODENAME)|" \
-e "s|@CURR_DATE@|$$(LC_ALL=C date)|" \
-e "s|@LABLGTK@|$(LABLGTK)|" \
-e "s|@OCAMLC@|$(OCAMLC)|" \
-e "s|@OCAMLOPT@|$(OCAMLOPT)|" \
-e "s|@WARNINGS@|$(WARNINGS)|" \
......
......@@ -32,6 +32,8 @@ let minor_version = @MINOR_VERSION@
let is_gui = ref false
let lablgtk = "@LABLGTK@"
let ocamlc = "@OCAMLC@"
let ocamlopt = "@OCAMLOPT@"
let ocaml_wflags = "@WARNINGS@"
......
......@@ -46,6 +46,10 @@ val is_gui: bool ref
(** Is the Frama-C GUI running?
@since Beryllium-20090601-beta1 *)
val lablgtk: string
(** Name of the lablgtk version against which Frama-C has been compiled.
blank if only command-line mode is available. *)
val ocamlc: string
(** Name of the bytecode compiler.
@since Boron-20100401 *)
......
......@@ -245,7 +245,8 @@ let load_script base =
else
Format.fprintf fmt "%s -c" Fc_config.ocamlc ;
Format.fprintf fmt " -g %s -warn-error a -I %s" Fc_config.ocaml_wflags Fc_config.libdir ;
if !Fc_config.is_gui then Format.pp_print_string fmt " -package lablgtk2" ;
if !Fc_config.is_gui && Fc_config.lablgtk <> "" then
Format.fprintf fmt " -package %s" Fc_config.lablgtk;
List.iter (fun p -> Format.fprintf fmt " -I %s" p) !load_path ;
Format.fprintf fmt " %S.ml" base ;
Format.pp_print_flush fmt () ;
......
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