Skip to content

Commit

Permalink
Add cabal target docs
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jan 2, 2025
1 parent 8364f50 commit 1869591
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ Arguments and flags common to some or all commands are:

Already generated `build-info.json` files will be removed since they would be stale otherwise.

.. _target-forms:

Target Forms
------------

Expand Down Expand Up @@ -735,6 +737,20 @@ Examples:
be used without arguments, in that case major version bumps are ignored for
all packages.

cabal target
^^^^^^^^^^^^

``cabal target [TARGETS]`` discloses fully-qualified targets from a selection of
targets and is useful for discovering targets in a project for use with other
commands taking [TARGETS]. This command can also check if a :ref:`target
form<target-forms>` is unique as some commands require a unique TARGET.

Any target forms except for a script target can be used with ``cabal target``.

For a package, all, module or filepath target, cabal target [TARGETS] will
**only** show ``libs`` and 'exes' of the [TARGETS]. To also show tests and
benchmarks, enable them with ``--enable-tests`` and ``--enable-benchmarks``.

.. _command-group-build:

Project building and installing
Expand Down

0 comments on commit 1869591

Please sign in to comment.