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

NAME

6       dune-rules - Dump internal rules.
7

SYNOPSIS

9       dune rules [OPTION]... [TARGET]...
10

DESCRIPTION

12       Dump Dune internal rules for the given targets. If no targets are
13       given, dump all the internal rules.
14
15       By default the output is a list of S-expressions, one S-expression per
16       rule. Each S-expression is of the form:
17
18         ((deps    (<dependencies>))
19          (targets (<targets>))
20          (context <context-name>)
21          (action  <action>))
22
23       <context-name> is the context is which the action is executed. It is
24       omitted if the action is independent from the context.
25
26       <action> is the action following the same syntax as user actions, as
27       described in the manual.
28

OPTIONS

30       -f, --force
31           Force actions associated to aliases to be re-executed even if their
32           dependencies haven't changed.
33
34       --help[=FMT] (default=auto)
35           Show this help in format FMT. The value FMT must be one of `auto',
36           `pager', `groff' or `plain'. With `auto', the format is `pager` or
37           `plain' whenever the TERM env var is `dumb' or undefined.
38
39       -m, --makefile
40           Output the rules in Makefile syntax.
41
42       -o FILE
43           Output to a file instead of stdout.
44
45       -r, --recursive
46           Print all rules needed to build the transitive dependencies of the
47           given targets.
48
49       --version
50           Show version information.
51
52       -w, --watch
53           Instead of terminating build after completion, wait continuously
54           for file changes.
55

COMMON OPTIONS

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

MORE HELP

158       Use `dune COMMAND --help' for help on a single command.
159

ENVIRONMENT

161       These environment variables affect the execution of rules:
162
163       DUNE_BUILD_DIR
164           Specified build directory. _build if unspecified
165
166       DUNE_PROFILE
167           Build profile. dev if unspecified or release if -p is set.
168
169       DUNE_STORE_ORIG_SOURCE_DIR
170           Store original source location in dune-package metadata
171

BUGS

173       Check bug reports at https://github.com/ocaml/dune/issues
174
175
176
177Dune 11VERSION11                                                 dune-rules(1)
Impressum