1DUNE-TOP(1) Dune Manual DUNE-TOP(1)
2
3
4
6 dune-top - Print a list of toplevel directives for including
7 directories and loading cma files.
8
10 dune top [OPTION]... [DIR]
11
13 Print a list of toplevel directives for including directories and
14 loading cma files.
15
16 The output of dune toplevel-init-file should be evaluated in a toplevel
17 to make a library available there.
18
20 --build-info
21 Show build information.
22
23 --context=CONTEXT (absent=default)
24 Select context where to build/run utop.
25
26 -f, --force
27 Force actions associated to aliases to be re-executed even if their
28 dependencies haven't changed.
29
30 --help[=FMT] (default=auto)
31 Show this help in format FMT. The value FMT must be one of `auto',
32 `pager', `groff' or `plain'. With `auto', the format is `pager` or
33 `plain' whenever the TERM env var is `dumb' or undefined.
34
35 --sandbox=VAL (absent DUNE_SANDBOX env)
36 Sandboxing mode to use by default. Some actions require a certain
37 sandboxing mode, so they will ignore this setting. The allowed
38 values are: none, symlink, copy.
39
40 --version
41 Show version information.
42
43 -w, --watch
44 Instead of terminating build after completion, wait continuously
45 for file changes.
46
48 These options are common to all commands.
49
50 --always-show-command-line
51 Always show the full command lines of programs executed by dune
52
53 --auto-promote
54 Automatically promote files. This is similar to running dune
55 promote after the build.
56
57 --build-dir=FILE (absent DUNE_BUILD_DIR env)
58 Specified build directory. _build if unspecified
59
60 --cache=VAL (absent DUNE_CACHE env)
61 Activate binary cache (either `disabled' or `enabled'). Default is
62 `disabled'.
63
64 --cache-check-probability=VAL (absent=0. or
65 DUNE_CACHE_CHECK_PROBABILITY env)
66 Probability cached rules are rerun to check for reproducibility
67
68 --cache-duplication=VAL (absent DUNE_CACHE_DUPLICATION env)
69 Binary cache duplication mode
70
71 --cache-transport=VAL (absent DUNE_CACHE_TRANSPORT env)
72 Binary cache protocol
73
74 --config-file=FILE
75 Load this configuration file instead of the default one.
76
77 --debug-artifact-substitution
78 Print debugging info about artifact substitution
79
80 --debug-backtraces
81 Always print exception backtraces.
82
83 --debug-dependency-path
84 In case of error, print the dependency path from the targets on the
85 command line to the rule that failed.
86
87 --debug-findlib
88 Debug the findlib sub-system.
89
90 --default-target=TARGET (absent=@@default)
91 Set the default target that when none is specified to dune build.
92
93 --diff-command=VAL
94 Shell command to use to diff files. Use - to disable printing the
95 diff.
96
97 --disable-promotion (absent DUNE_DISABLE_PROMOTION env)
98 Disable all promotion rules
99
100 --display=MODE
101 Control the display mode of Dune. See dune-config(5) for more
102 details.
103
104 --ignore-promoted-rules
105 Ignore rules with (mode promote), except ones with (only ...). The
106 variable %{ignoring_promoted_rules} in dune files reflects whether
107 this option was passed or not.
108
109 --instrument-with=BACKENDS (absent DUNE_INSTRUMENT_WITH env)
110 "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
111 list of library names, each one of which must declare an
112 instrumentation backend.
113
114 -j JOBS
115 Run no more than JOBS commands simultaneously.
116
117 --no-buffer
118 Do not buffer the output of commands executed by dune. By default
119 dune buffers the output of subcommands, in order to prevent
120 interleaving when multiple commands are executed in parallel.
121 However, this can be an issue when debugging long running tests.
122 With --no-buffer, commands have direct access to the terminal. Note
123 that as a result their output won't be captured in the log file.
124 You should use this option in conjunction with -j 1, to avoid
125 interleaving. Additionally you should use --verbose as well, to
126 make sure that commands are printed before they are being executed.
127
128 --no-config
129 Do not load the configuration file
130
131 --no-print-directory
132 Suppress "Entering directory" messages
133
134 --only-packages=PACKAGES
135 Ignore stanzas referring to a package that is not in PACKAGES.
136 PACKAGES is a comma-separated list of package names. Note that this
137 has the same effect as deleting the relevant stanzas from dune
138 files. It is mostly meant for releases. During development, it is
139 likely that what you want instead is to build a particular
140 <package>.install target.
141
142 -p PACKAGES, --for-release-of-packages=PACKAGES (required)
143 Shorthand for --release --only-packages PACKAGE. You must use this
144 option in your <package>.opam files, in order to build only what's
145 necessary when your project contains multiple packages as well as
146 getting reproducible builds.
147
148 --profile=VAL (absent DUNE_PROFILE env)
149 Select the build profile, for instance dev or release. The default
150 is dev.
151
152 --promote-install-files[=VAL] (default=true)
153 Promote the generated <package>.install files to the source tree
154
155 --release
156 Put dune into a reproducible release mode. This is in fact a
157 shorthand for --root . --ignore-promoted-rules --no-config
158 --profile release --always-show-command-line
159 --promote-install-files --default-target @install. You should use
160 this option for release builds. For instance, you must use this
161 option in your <package>.opam files. Except if you already use -p,
162 as -p implies this option.
163
164 --root=DIR
165 Use this directory as workspace root instead of guessing it. Note
166 that this option doesn't change the interpretation of targets given
167 on the command line. It is only intended for scripts.
168
169 --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
170 Store original source location in dune-package metadata
171
172 --terminal-persistence=MODE
173 Changes how the log of build results are displayed to the console
174 between rebuilds while in --watch mode. Supported modes: preserve,
175 clear-on-rebuild.
176
177 --trace-file=FILE
178 Output trace data in catapult format (compatible with
179 chrome://tracing)
180
181 --verbose
182 Same as --display verbose
183
184 --workspace=FILE (absent DUNE_WORKSPACE env)
185 Use this specific workspace file instead of looking it up.
186
187 -x VAL
188 Cross-compile using this toolchain.
189
191 Use `dune COMMAND --help' for help on a single command.
192
194 These environment variables affect the execution of top:
195
196 DUNE_BUILD_DIR
197 Specified build directory. _build if unspecified
198
199 DUNE_CACHE
200 Activate binary cache (either `disabled' or `enabled'). Default is
201 `disabled'.
202
203 DUNE_CACHE_CHECK_PROBABILITY
204 Probability cached rules are rerun to check for reproducibility
205
206 DUNE_CACHE_DUPLICATION
207 Binary cache duplication mode
208
209 DUNE_CACHE_TRANSPORT
210 Binary cache protocol
211
212 DUNE_DISABLE_PROMOTION
213 Disable all promotion rules
214
215 DUNE_INSTRUMENT_WITH
216 "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
217 list of library names, each one of which must declare an
218 instrumentation backend.
219
220 DUNE_PROFILE
221 Build profile. dev if unspecified or release if -p is set.
222
223 DUNE_SANDBOX
224 Sandboxing mode to use by default. (see --sandbox)
225
226 DUNE_STORE_ORIG_SOURCE_DIR
227 Store original source location in dune-package metadata
228
229 DUNE_WORKSPACE
230 Use this specific workspace file instead of looking it up.
231
233 Check bug reports at https://github.com/ocaml/dune/issues
234
235
236
237Dune n/a DUNE-TOP(1)