Skip to content
Snippets Groups Projects
Commit ab1868ba authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[frama-c-config] replace binary with wrapper script

parent 0aab40cd
No related branches found
No related tags found
No related merge requests found
...@@ -415,7 +415,7 @@ available: ...@@ -415,7 +415,7 @@ available:
- `frama-c` - `frama-c`
- `frama-c-gui` if available - `frama-c-gui` if available
- `frama-c-config` displays Frama-C configuration paths - `frama-c-config` lightweight wrapper used to display configuration paths
- `frama-c.byte` bytecode version of frama-c - `frama-c.byte` bytecode version of frama-c
- `frama-c-gui.byte` bytecode version of frama-c-gui, if available - `frama-c-gui.byte` bytecode version of frama-c-gui, if available
- `ptests.opt` testing tool for Frama-c - `ptests.opt` testing tool for Frama-c
......
...@@ -338,7 +338,7 @@ DOC_GEN_FILES:=$(addprefix doc/code/,\ ...@@ -338,7 +338,7 @@ DOC_GEN_FILES:=$(addprefix doc/code/,\
# additional compilation targets for 'make all'. # additional compilation targets for 'make all'.
# cannot be delayed after 'make all' # cannot be delayed after 'make all'
EXTRAS = ptests bin/fc-config$(EXE) EXTRAS = ptests
ifneq ($(ENABLE_GUI),no) ifneq ($(ENABLE_GUI),no)
ifeq ($(HAS_LABLGTK),yes) ifeq ($(HAS_LABLGTK),yes)
...@@ -1979,9 +1979,7 @@ install:: install-lib-$(OCAMLBEST) ...@@ -1979,9 +1979,7 @@ install:: install-lib-$(OCAMLBEST)
fi fi
$(CP) bin/ptests.$(OCAMLBEST)$(EXE) \ $(CP) bin/ptests.$(OCAMLBEST)$(EXE) \
$(BINDIR)/ptests.$(OCAMLBEST)$(EXE) $(BINDIR)/ptests.$(OCAMLBEST)$(EXE)
if [ -x bin/fc-config$(EXE) ] ; then \ $(CP) bin/frama-c-config $(BINDIR)/frama-c-config; \
$(CP) bin/fc-config$(EXE) $(BINDIR)/frama-c-config$(EXE); \
fi
if [ -x bin/frama-c-script ] ; then \ if [ -x bin/frama-c-script ] ; then \
$(CP) bin/frama-c-script $(BINDIR)/frama-c-script; \ $(CP) bin/frama-c-script $(BINDIR)/frama-c-script; \
fi fi
...@@ -2236,7 +2234,6 @@ clean:: $(PLUGIN_LIST:=_CLEAN) \ ...@@ -2236,7 +2234,6 @@ clean:: $(PLUGIN_LIST:=_CLEAN) \
$(PRINT_RM) binaries $(PRINT_RM) binaries
$(RM) bin/toplevel.byte$(EXE) bin/viewer.byte$(EXE) \ $(RM) bin/toplevel.byte$(EXE) bin/viewer.byte$(EXE) \
bin/ptests.byte$(EXE) bin/*.opt$(EXE) bin/toplevel.top$(EXE) bin/ptests.byte$(EXE) bin/*.opt$(EXE) bin/toplevel.top$(EXE)
$(RM) bin/fc-config$(EXE)
smartclean: smartclean:
$(MAKE) -f share/Makefile.clean smartclean $(MAKE) -f share/Makefile.clean smartclean
......
...@@ -158,30 +158,6 @@ else ...@@ -158,30 +158,6 @@ else
$(CHMOD_RO) $@ $(CHMOD_RO) $@
endif endif
##################
# Frama-C-config #
##################
src/kernel_internals/runtime/frama_c_config.ml: src/kernel_internals/runtime/fc_config.ml \
src/kernel_internals/runtime/frama_c_config.ml.in Makefile.generating
$(PRINT_MAKING) $@
$(RM) $@
$(ECHO) "module Filepath = struct let add_symbolic_dir _ _ = () end" >> $@
$(ECHO) "module Fc_config = struct" >> $@
$(CAT) src/kernel_internals/runtime/fc_config.ml >> $@
$(ECHO) "end" >> $@
$(CAT) src/kernel_internals/runtime/frama_c_config.ml.in >> $@
$(CHMOD_RO) $@
GENERATED+= src/kernel_internals/runtime/frama_c_config.ml
bin/fc-config$(EXE): src/kernel_internals/runtime/frama_c_config.ml
ifeq ($(OCAMLBEST),opt)
$(OCAMLOPT) str.cmxa $< -o $@
else
$(OCAMLC) str.cma $< -o $@
endif
# Merlin # # Merlin #
.PHONY:merlin .PHONY:merlin
......
...@@ -21,7 +21,4 @@ ...@@ -21,7 +21,4 @@
# # # #
########################################################################## ##########################################################################
exec $(dirname $0)/frama-c -no-autoload-plugins "$@"
. $(dirname $0)/local_export.sh
exec $BINDIR/fc-config "$@"
...@@ -371,7 +371,6 @@ src/kernel_internals/runtime/dump_config.ml: CEA_LGPL ...@@ -371,7 +371,6 @@ src/kernel_internals/runtime/dump_config.ml: CEA_LGPL
src/kernel_internals/runtime/dump_config.mli: CEA_LGPL src/kernel_internals/runtime/dump_config.mli: CEA_LGPL
src/kernel_internals/runtime/fc_config.ml.in: CEA_LGPL src/kernel_internals/runtime/fc_config.ml.in: CEA_LGPL
src/kernel_internals/runtime/fc_config.mli: CEA_LGPL src/kernel_internals/runtime/fc_config.mli: CEA_LGPL
src/kernel_internals/runtime/frama_c_config.ml.in: CEA_LGPL
src/kernel_internals/runtime/frama_c_init.ml: CEA_LGPL src/kernel_internals/runtime/frama_c_init.ml: CEA_LGPL
src/kernel_internals/runtime/frama_c_init.mli: CEA_LGPL src/kernel_internals/runtime/frama_c_init.mli: CEA_LGPL
src/kernel_internals/runtime/gui_init.ml: CEA_LGPL src/kernel_internals/runtime/gui_init.ml: CEA_LGPL
......
(**************************************************************************)
(* *)
(* This file is part of Frama-C. *)
(* *)
(* Copyright (C) 2007-2020 *)
(* CEA (Commissariat à l'énergie atomique et aux énergies *)
(* alternatives) *)
(* *)
(* you can redistribute it and/or modify it under the terms of the GNU *)
(* Lesser General Public License as published by the Free Software *)
(* Foundation, version 2.1. *)
(* *)
(* It is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU Lesser General Public License for more details. *)
(* *)
(* See the GNU Lesser General Public License version 2.1 *)
(* for more details (enclosed in the file licenses/LGPLv2.1). *)
(* *)
(**************************************************************************)
# 24 "src/kernel_internals/runtime/frama_c_config.ml.in"
(** This file is *not* linked in Frama-C. Instead, is it is concatenated
to Config, to create a standalone executable *)
let version _ =
Format.printf
"Frama-C %s (%s)@\n\
Environment:@\n \
FRAMAC_SHARE = %S@\n \
FRAMAC_LIB = %S@\n \
FRAMAC_PLUGIN = %S@."
Fc_config.version Fc_config.codename
Fc_config.datadir Fc_config.libdir Fc_config.plugin_path
;
exit 0
let options = Arg.([
"-print-share-path",
Unit (fun _ -> Format.printf "%s%!" Fc_config.datadir; exit 0),
" Print the path of Frama-C share directory";
"-share",
Unit (fun _ -> Format.printf "%s%!" Fc_config.datadir; exit 0),
" Alias for -print-share-path";
"-libc",
Unit (fun _ -> Format.printf "%s%!"
(Filename.concat Fc_config.datadir "libc"); exit 0),
" Print the path of Frama-C standard library directory";
"-scripts",
Unit (fun _ -> Format.printf "%s%!"
(Filename.concat Fc_config.datadir "analysis-scripts"); exit 0),
" Print the path of Frama-C analysis-scripts directory";
"-print-libpath",
Unit (fun _ -> Format.printf "%s%!" Fc_config.libdir; exit 0),
" Print the path of Frama-C kernel library";
"-libpath",
Unit (fun _ -> Format.printf "%s%!" Fc_config.libdir; exit 0),
" Alias for -print-libpath";
"-print-plugin-path",
Unit (fun _ -> Format.printf "%s%!" Fc_config.plugin_path; exit 0),
" Print the path where Frama-C dynamic plug-ins are searched for";
"-plugin-path",
Unit (fun _ -> Format.printf "%s%!" Fc_config.plugin_path; exit 0),
" Alias for -print-plugin-path";
"-print-version",
Unit (fun _ -> Format.printf "%s%!" Fc_config.version; exit 0),
" Print the version number of Frama-C";
"-version",
Unit version,
" Display full version and configuration information"
])
let usage = "\
Usage: frama-c-config <option>"
let () =
Arg.parse options (fun _ -> ()) usage;
version () (* We only get here if no option has been specified *)
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