dune runs it keeps things nice and tidy by putting build artifacts in the
_build directory. Probably the biggest obstacle when converting a codebase from, say,
omake, is that
omake puts executables in the current directory and you may have workflows that depend on this.
Is there an easy recipe to have
dune generate symlinks to executables that it builds and stick them in the directory that the
(executable ...) stanza appears in?
I agree, I’ve been doing these symlinks by hand for a while now.
dune wizard but I think that you can add the following stanza in your dune file:
(copy foo.exe foo))
and it will make it so that the executable that dune names
foo.exe will then be copied under the name
foo in your source tree (probably in the same directory as the dune file where the stanza is I’d guess) when you ask dune to build
foo. You can then even create rules that depend on
foo.exe). It might need
promote option of executable stanza.
Wow, I read through the list of options for
executable twice and didn’t parse that that’s what promote did.
Totally works. Thanks!
have a look for “promote” in the manual.