Two-parter. I’m converting a large-ish codebase from
Is it possible to tell
dune, from the toplevel of a big tree with many sub-dirs that contain
dune files with
executable stanzas, to only build all
.exe files for the whole tree?
dune build @all builds all
.exe files, but also
.bc files. I’m using promote and
.bc files are being generated and promoted to the source tree as well as
Aside from being messy, it significantly increases the build time to have dune also generate runnable
.bc files that aren’t going to be used.
I can throw
(modes (native exe)) in each
executable to restrict what gets built to only
.exe, but it feels like I’m on the wrong track with this.
OMakefiles had very make-like targets, such as
install-remote: which runs an external script, or shells out to the UNIX
rsync commands with args (after building the
.exe files). Is there a way to do something similar? I don’t want to turn things into opam packages, or stick things in the opam root, which it seems dune is geared for. It seems clunky to try to get
dune to do a simple
I just want to say
cd $REPO/tools; dune install and have it build all
.exe files in the directory and install them to
/usr/local/bin/ without struggling.
It’s so clunky (or I’m so confused) that … right now I’m working around this by… also sticking a
Makefile in my project directories that will call the right
dune builds before dispatching to
rsync or whatever. Feels a bit like one step backwards. Is this the intent?