@@ -65,14 +65,10 @@ Some examples:
65
65
$ cabal v2-update # update all remote repos
66
66
$ cabal v2-update head.hackage # update only head.hackage
67
67
68
- cabal v2-build
69
- ---------------
70
-
71
- ``cabal v2-build `` takes a set of targets and builds them. It
72
- automatically handles building and installing any dependencies of these
73
- targets.
68
+ Target Forms
69
+ ------------
74
70
75
- A target can take any of the following forms:
71
+ A cabal command target can take any of the following forms:
76
72
77
73
- A package target: ``package ``, which specifies that all enabled
78
74
components of a package to be built. By default, test suites and
@@ -101,6 +97,13 @@ A target can take any of the following forms:
101
97
- A filepath target: ``[package:][ctype:]filepath ``, which specifies that the
102
98
component of which the given filepath is a part of will be built.
103
99
100
+ cabal v2-build
101
+ ---------------
102
+
103
+ ``cabal v2-build `` takes a set of targets and builds them. It
104
+ automatically handles building and installing any dependencies of these
105
+ targets.
106
+
104
107
In component targets, ``package: `` and ``ctype: `` (valid component types
105
108
are ``lib ``, ``flib ``, ``exe ``, ``test `` and ``bench ``) can be used to
106
109
disambiguate when multiple packages define the same component, or the
@@ -287,9 +290,14 @@ invocations and bringing the project's executables into scope.
287
290
cabal v2-install
288
291
-----------------
289
292
290
- ``cabal v2-install [FLAGS] PACKAGES `` builds the specified packages and
293
+ ``cabal v2-install [FLAGS] [TARGETS] `` builds the specified target packages and
291
294
symlinks/copies their executables in ``installdir `` (usually ``~/.cabal/bin ``).
292
295
296
+ .. warning ::
297
+
298
+ If not every package has an executable to install, use ``all:exes `` rather
299
+ than ``all `` as the target.
300
+
293
301
For example this command will build the latest ``cabal-install `` and symlink
294
302
its ``cabal `` executable:
295
303
0 commit comments