Skip to content

Commit

Permalink
Document the workspace level env stanza
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jul 21, 2018
1 parent 8fc524b commit 4bf77cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ next
passing in `--root` in conjunction with `--workspace` or `--config` would not
work correctly (#997, @rgrinberg)

- Add support for customizing env nodes in workspace files. The `env` stanza is
now allowed in toplevel position in the workspace file, or for individual
contexts. This feature requires `(dune lang 1.1)` (#1038, @rgrinberg)

1.0.1 (19/07/2018)
------------------

Expand Down
11 changes: 11 additions & 0 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ The build profile can be selected in the ``dune-workspace`` file by write a
Note that the command line option ``--profile`` has precedence over this stanza.

env
~~~

The ``env`` stanza can be used to set the base environment for all contexts in
this workspace. This environment has the lowest precedence of all other ``env``
stanzas. The syntax for this stanza is the same dune's :ref:`dune-env` stanza.

context
~~~~~~~

Expand Down Expand Up @@ -407,6 +414,10 @@ context or can be the description of an opam switch, as follows:
context. This has precedence over the command line option
``--profile``

- ``(env <env>)`` to set the environment for a particular context. This is of
higher precedence than the toplevel ``env`` stanza in the workspace file. This
field the same options as the :ref:`dune-env` stanza.

Both ``(default ...)`` and ``(opam ...)`` accept a ``targets`` field in order to
setup cross compilation. See :ref:`advanced-cross-compilation` for more
information.
Expand Down

0 comments on commit 4bf77cf

Please sign in to comment.