2017-05-14 00:10:00 +00:00
|
|
|
***********
|
|
|
|
Terminology
|
|
|
|
***********
|
|
|
|
|
|
|
|
- **package**: a package is a set of libraries, executables, ... that
|
|
|
|
are built and installed as one by opam
|
|
|
|
|
|
|
|
- **project**: a project is a source tree, maybe containing one or more
|
|
|
|
packages
|
|
|
|
|
|
|
|
- **root**: the root is the directory from where Jbuilder can build
|
|
|
|
things. Jbuilder knows how to build targets that are descendents of
|
|
|
|
the root. Anything outside of the tree starting from the root is
|
|
|
|
considered part of the **installed world**. How the root is
|
2017-05-18 20:15:49 +00:00
|
|
|
determined is explained in :ref:`finding-root`.
|
2017-05-14 00:10:00 +00:00
|
|
|
|
|
|
|
- **workspace**: the workspace is the subtree starting from the root.
|
|
|
|
It can contain any number of projects that will be built
|
|
|
|
simultaneously by jbuilder
|
|
|
|
|
|
|
|
- **installed world**: anything outside of the workspace, that Jbuilder
|
|
|
|
takes for granted and doesn't know how to build
|
|
|
|
|
2017-06-05 11:33:45 +00:00
|
|
|
- **installation**: this is the action of copying build artifacts or
|
|
|
|
other files from the ``<root>/_build`` directory to the installed
|
|
|
|
world
|
|
|
|
|
|
|
|
- **scope**: a scope determines where private items are
|
|
|
|
visible. Private items include libraries or binaries that will not
|
|
|
|
be installed. In Jbuilder, scopes are sub-trees rooted where at
|
|
|
|
least one ``<package>.opam`` file is present. Moreover, scopes are
|
2017-06-17 16:06:58 +00:00
|
|
|
exclusive. Typically, every project defines a single scope. See
|
2017-06-05 11:33:45 +00:00
|
|
|
:ref:`scopes` for more details
|
|
|
|
|
2017-05-14 00:10:00 +00:00
|
|
|
- **build context**: a build context is a subdirectory of the
|
|
|
|
``<root>/_build`` directory. It contains all the build artifacts of
|
|
|
|
the workspace built against a specific configuration. Without
|
|
|
|
specific configuration from the user, there is always a ``default``
|
|
|
|
build context, which corresponds to the environment in which Jbuilder
|
|
|
|
is executed. Build contexts can be specified by writing a
|
2017-05-18 20:15:49 +00:00
|
|
|
:ref:`jbuild-workspace` file
|
2017-05-14 00:10:00 +00:00
|
|
|
|
|
|
|
- **build context root**: the root of a build context named ``foo`` is
|
|
|
|
``<root>/_build/<foo>``
|
|
|
|
|
2017-09-29 15:49:05 +00:00
|
|
|
- **alias**: an alias is a build target that doesn't produce any file
|
|
|
|
and has configurable dependencies. Aliases are
|
|
|
|
per-directory. However, on the command line, asking for an alias to
|
|
|
|
be built in a given directory will trigger the construction of the
|
|
|
|
alias in all children directories recursively. Jbuilder defines the
|
|
|
|
following standard aliases:
|
2017-05-14 00:10:00 +00:00
|
|
|
|
|
|
|
- ``runtest`` which runs user defined tests
|
|
|
|
- ``install`` which depends on everything that should be installed
|
2017-05-26 17:34:03 +00:00
|
|
|
- ``doc`` which depends on the generated HTML
|
|
|
|
documentation. See :ref:`apidoc` for details
|
2018-05-04 15:49:25 +00:00
|
|
|
|
|
|
|
- **environment**: in Jbuilder, each directory has an environment
|
|
|
|
attached to it. The environment determines the default values of
|
|
|
|
various parameters, such as the compilation flags. Inside a scope,
|
|
|
|
each directory inherit the environment from its parent. At the root
|
|
|
|
of every scope, a default environment is used. At any point, the
|
|
|
|
environment can be altered using an `env`_ stanza.
|
|
|
|
|
|
|
|
- **build profile**: a global setting that influence various
|
|
|
|
defaults. It can be set from the command line using ``--profile
|
|
|
|
<profile>`` or from ``jbuild-workspace`` files. The following
|
|
|
|
profiles are standard:
|
|
|
|
|
|
|
|
- ``default`` which is the default profile when none is set explicitely
|
|
|
|
- ``release`` which is the profile used for opam releases
|
|
|
|
- ``dev`` which has stricter warnings
|