ocaml/man
Gabriel Scherer 559206b4e0 ocamlc -config: new -config-var option to print specific configuration variables
The proposed behavior of `-config-var s` is as follows:
- if `s` is an existing configuration variable, print its value as
  a string and exit with a success return value (0)
- if `s` is not an existing configuration variable, print nothing
  and exit with a failure return value (non-0)

Note that we do not print a newline after the value of the
configuration variable. In particular, if the value is an empty
string, the output is undistinguishable from the output for
non-existing variables, the return value has to be considered instead.

The following alternative behaviors were considered:

- We could print a newline after the configuration value, which
  would let users distinguish empty values from non-existing variables
  by counting the lines of output, and would also be more pleasant for
  users invoking the option from the command-line. However, the way
  bash works on Windows means that $(ocamlc -config-var foo) would keep
  a trailing \r in its output, and portable scripts would have to use
  $(ocamlc -config-var foo | tr -d '\r') instead, which is a pain.
  (This issue was pointed out by David Allsopp)

- We could print a message on the error output if the configuration
  variable does not exist. This is clearer to a human user, but it is
  annoying for scripts if they forget to silence the error output and
  get their output mixed with our error messages. The main use of this
  new feature is for scripting purposes.
2018-04-27 19:54:08 +02:00
..
Makefile Fix man/Makefile 2017-05-23 15:11:25 +02:00
ocaml.m toplevel: remove plugin option in toplevel 2017-09-30 11:03:53 +02:00
ocamlc.m ocamlc -config: new -config-var option to print specific configuration variables 2018-04-27 19:54:08 +02:00
ocamlcp.m Update headers for the new license. 2016-02-18 16:59:16 +01:00
ocamldebug.m document .ocamldebug, the debugger initialization file 2016-04-18 11:25:01 -04:00
ocamldep.m ocamldep: add -plugin and use compilerlibs to build (#1015) 2017-03-02 16:45:58 +01:00
ocamldoc.m Ocamldoc manpage update (#1356) 2017-09-23 18:49:17 +02:00
ocamllex.m Update headers for the new license. 2016-02-18 16:59:16 +01:00
ocamlmktop.m Update headers for the new license. 2016-02-18 16:59:16 +01:00
ocamlopt.m ocamlc -config: new -config-var option to print specific configuration variables 2018-04-27 19:54:08 +02:00
ocamlprof.m Update headers for the new license. 2016-02-18 16:59:16 +01:00
ocamlrun.m Merge tag 4.03.0 into trunk. 2016-04-28 16:13:21 +02:00
ocamlyacc.m Rename -e to --strict in the ocamlyacc man page. 2016-06-22 09:15:40 +01:00