Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

More converting project from omake to dune questions

$
0
0

@mbacarella wrote:

Two-parter. I’m converting a large-ish codebase from omake to dune.

PART ONE

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?

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 each executable to restrict what gets built to only .exe, but it feels like I’m on the wrong track with this.

PART TWO

My OMakefiles had very make-like targets, such as install: and install-remote: which runs an external script, or shells out to the UNIX install and 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 make-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 right dune builds before dispatching to install or rsync or whatever. Feels a bit like one step backwards. Is this the intent?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles