1dune-build(1)                     Dune Manual                    dune-build(1)
2
3
4

NAME

6       dune-build - Build the given targets, or all installable targets if
7       none are given.
8

SYNOPSIS

10       dune build [OPTION]... [TARGET]...
11

DESCRIPTION

13       Targets starting with a @ are interpreted as aliases.
14

OPTIONS

16       --build-info
17           Show build information.
18
19       -f, --force
20           Force actions associated to aliases to be re-executed even if their
21           dependencies haven't changed.
22
23       --help[=FMT] (default=auto)
24           Show this help in format FMT. The value FMT must be one of `auto',
25           `pager', `groff' or `plain'. With `auto', the format is `pager` or
26           `plain' whenever the TERM env var is `dumb' or undefined.
27
28       --version
29           Show version information.
30
31       -w, --watch
32           Instead of terminating build after completion, wait continuously
33           for file changes.
34

COMMON OPTIONS

36       These options are common to all commands.
37
38       --always-show-command-line
39           Always show the full command lines of programs executed by dune
40
41       --auto-promote
42           Automatically promote files. This is similar to running dune
43           promote after the build.
44
45       --build-dir=FILE (absent DUNE_BUILD_DIR env)
46           Specified build directory. _build if unspecified
47
48       --config-file=FILE
49           Load this configuration file instead of the default one.
50
51       --debug-backtraces
52           Always print exception backtraces.
53
54       --debug-dependency-path
55           In case of error, print the dependency path from the targets on the
56           command line to the rule that failed.
57
58       --debug-findlib
59           Debug the findlib sub-system.
60
61       --default-target=TARGET (absent=@@default)
62           Set the default target that when none is specified to dune build.
63
64       --dev
65           Same as --profile dev
66
67       --diff-command=VAL
68           Shell command to use to diff files. Use - to disable printing the
69           diff.
70
71       --display=MODE
72           Control the display mode of Dune. See dune-config(5) for more
73           details.
74
75       --ignore-promoted-rules
76           Ignore rules with (mode promote), except ones with (only ...). The
77           variable %{ignoring_promoted_rules} in dune files reflects whether
78           this option was passed or not.
79
80       -j JOBS
81           Run no more than JOBS commands simultaneously.
82
83       --no-buffer
84           Do not buffer the output of commands executed by dune. By default
85           dune buffers the output of subcommands, in order to prevent
86           interleaving when multiple commands are executed in parallel.
87           However, this can be an issue when debugging long running tests.
88           With --no-buffer, commands have direct access to the terminal. Note
89           that as a result their output won't be captured in the log file.
90           You should use this option in conjunction with -j 1, to avoid
91           interleaving. Additionally you should use --verbose as well, to
92           make sure that commands are printed before they are being executed.
93
94       --no-config
95           Do not load the configuration file
96
97       --no-print-directory
98           Suppress "Entering directory" messages
99
100       --only-packages=PACKAGES
101           Ignore stanzas referring to a package that is not in PACKAGES.
102           PACKAGES is a comma-separated list of package names. Note that this
103           has the same effect as deleting the relevant stanzas from jbuild
104           files. It is mostly meant for releases. During development, it is
105           likely that what you want instead is to build a particular
106           <package>.install target.
107
108       -p PACKAGES, --for-release-of-packages=PACKAGES
109           Shorthand for --root . --only-packages PACKAGE
110           --ignore-promoted-rules --no-config --profile release. You must use
111           this option in your <package>.opam files, in order to build only
112           what's necessary when your project contains multiple packages as
113           well as getting reproducible builds.
114
115       --profile=VAL (absent DUNE_PROFILE env)
116           Select the build profile, for instance dev or release. The default
117           is dev.
118
119       --root=DIR
120           Use this directory as workspace root instead of guessing it. Note
121           that this option doesn't change the interpretation of targets given
122           on the command line. It is only intended for scripts.
123
124       --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
125           Store original source location in dune-package metadata
126
127       --trace-file=FILE
128           Output trace data in catapult format (compatible with
129           chrome://tracing)
130
131       --verbose
132           Same as --display verbose
133
134       --workspace=FILE (absent DUNE_WORKSPACE env)
135           Use this specific workspace file instead of looking it up.
136
137       -x VAL
138           Cross-compile using this toolchain.
139

MORE HELP

141       Use `dune COMMAND --help' for help on a single command.
142

ENVIRONMENT

144       These environment variables affect the execution of build:
145
146       DUNE_BUILD_DIR
147           Specified build directory. _build if unspecified
148
149       DUNE_PROFILE
150           Build profile. dev if unspecified or release if -p is set.
151
152       DUNE_STORE_ORIG_SOURCE_DIR
153           Store original source location in dune-package metadata
154
155       DUNE_WORKSPACE
156           Use this specific workspace file instead of looking it up.
157

BUGS

159       Check bug reports at https://github.com/ocaml/dune/issues
160
161
162
163Dune n/a                                                         dune-build(1)
Impressum