diff --git a/doc/userman/user-changes.tex b/doc/userman/user-changes.tex index 625dcc2db4a5fcfaa313c0d255f070bfd3b320b5..c2d128136851bdda4d32c1a012e7dd380691b341 100644 --- a/doc/userman/user-changes.tex +++ b/doc/userman/user-changes.tex @@ -6,6 +6,8 @@ release. First we list changes of the last release. \section*{\nextframacversion} \begin{itemize} +\item \textbf{Getting Started:} added option + \texttt{-print-config-json}. \item \textbf{Getting Started:} added option \texttt{-autocomplete}. \item \textbf{Getting Started:} updated installation instructions. diff --git a/doc/userman/user-start.tex b/doc/userman/user-start.tex index ef3dd8f71b3110428d896da94b838e8cc0aa2ac5..ca5e31386653aaea9e25f0834e63a5bdc0503401 100644 --- a/doc/userman/user-start.tex +++ b/doc/userman/user-start.tex @@ -146,6 +146,10 @@ all documented with \texttt{-kernel-h}: There are many aliases for these options, but for backward compatibility purposes only. Those listed above should be used for scripting. +For a more thorough display of configuration-related data, in JSON format, +use option \optiondef{-}{print-config-json}. Note that the data output by this +option is likely to change in future releases. + \subsection{Options Outline} The batch and interactive versions of \FramaC obey a number of diff --git a/man/frama-c.1 b/man/frama-c.1 index 92ee3debed2a8a3d2436bfb37cebe1338704a786..f175412be20b91f5b8c7a1d557822d8e9831fa3d 100644 --- a/man/frama-c.1 +++ b/man/frama-c.1 @@ -25,7 +25,7 @@ .\" using pandoc 2.0 or newer. To modify this file, edit the Markdown file .\" and run `make man/frama-c.1`. -.TH FRAMA-C 1 2020-09-21 +.TH FRAMA-C 1 2020-10-07 .SH NAME .PP frama-c[.byte] - a static analyzer for C programs @@ -437,6 +437,9 @@ Defaults to no. .B -print-cpp-commands outputs the preprocessing commands for all input files. .TP +.B -print-config-json +outputs extensive Frama-C configuration data in JSON format. +.TP .B [-no]-print-libc expands \f[B]#include\f[R] directives in the pretty-printed CIL code for files in the Frama-C standard library. diff --git a/man/frama-c.1.header b/man/frama-c.1.header index 8d12fafa546d1e339543e2998e30ae71d8248f46..c70585242be9b04d9332047bf305dd8626f45879 100644 --- a/man/frama-c.1.header +++ b/man/frama-c.1.header @@ -25,4 +25,4 @@ .\" using pandoc 2.0 or newer. To modify this file, edit the Markdown file .\" and run `make man/frama-c.1`. -.TH FRAMA-C 1 2020-09-21 +.TH FRAMA-C 1 2020-10-07 diff --git a/man/frama-c.1.md b/man/frama-c.1.md index 30c76c5d3c59430a1b1abd0ea0661a02d708e008..ca5a103976ccf8734e9140b313d240ca0c79cac4 100644 --- a/man/frama-c.1.md +++ b/man/frama-c.1.md @@ -340,6 +340,9 @@ See also **-cpp-frama-c-compliant**. -print-cpp-commands : outputs the preprocessing commands for all input files. +-print-config-json +: outputs extensive Frama-C configuration data in JSON format. + [-no]-print-libc : expands **#include** directives in the pretty-printed CIL code for files in the Frama-C standard library. Defaults to no. diff --git a/src/kernel_internals/runtime/dump_config.ml b/src/kernel_internals/runtime/dump_config.ml index a6f89a5e9f500e03fff7089d8963bf24e7c230bd..15ffcdaad28cd58a3006b69de9b954946abec2ac 100644 --- a/src/kernel_internals/runtime/dump_config.ml +++ b/src/kernel_internals/runtime/dump_config.ml @@ -51,6 +51,7 @@ let dump_to_json () = "major_version", `Int Fc_config.major_version ; "minor_version", `Int Fc_config.minor_version ; "is_gui", `Bool !Fc_config.is_gui ; + "lablgtk", `String Fc_config.lablgtk ; "ocamlc", `String Fc_config.ocamlc ; "ocamlopt", `String Fc_config.ocamlopt ; "ocaml_wflags", `String Fc_config.ocaml_wflags ; diff --git a/src/kernel_internals/runtime/dump_config.mli b/src/kernel_internals/runtime/dump_config.mli index ea08b4981ee18fe8568dbab8bcedc3df9dc1920b..018f6f72255b3fe3ce065072b18903c578405fcb 100644 --- a/src/kernel_internals/runtime/dump_config.mli +++ b/src/kernel_internals/runtime/dump_config.mli @@ -21,7 +21,7 @@ (**************************************************************************) val dump_to_json : unit -> Yojson.Basic.t -(** Builds a Json object describing the Frama-C configuration *) +(** Builds a Json object describing the Frama-C configuration. *) val dump_to_stdout : unit -> unit -(** Dumps a Json object to describing the Frama-C configuration to stdout *) +(** Dumps a Json object describing the Frama-C configuration to stdout. *) diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 5663b635e021a79d823d077df4ff92c4e3c32bcd..b95618a9b88aea3a374bba8e99a4ce511ab78483 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -425,8 +425,8 @@ module PrintConfigJson = (struct let module_name = "PrintConfigJson" let option_name = "-print-config-json" - let help = "print several information about frama-configuration inside a \ - JSON object" + let help = "prints extensive data about Frama-C's configuration, in \ + JSON format, and exits." end) let () = Parameter_customize.set_group help