@mbacarella wrote:
Two-parter. I’m converting a large-ish codebase from
omake
todune
.PART ONE
Is it possible to tell
dune
, from the toplevel of a big tree with many sub-dirs that containdune
files withexecutable
stanzas, to only build all.exe
files for the whole tree?Doing
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.exe
files.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 eachexecutable
to restrict what gets built to only.exe
, but it feels like I’m on the wrong track with this.PART TWO
My
OMakefile
s had very make-like targets, such asinstall:
andinstall-remote:
which runs an external script, or shells out to the UNIXinstall
andrsync
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 getdune
to do a simplemake
-like thing.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 rightdune build
s before dispatching toinstall
orrsync
or whatever. Feels a bit like one step backwards. Is this the intent?
Posts: 3
Participants: 2