0

I know about the copy_files stanza, but I'm stuck trying to copy files from one subdirectory to another (e.g. the root). Specifically, I'm trying to copy %{workspace_root}/static/ to _build/default/ instead of _build/default/static.

Doing so from the shell is trivial: cp static/* _build/default, but I would like to use the dune build system. According to ChatGPT this isn't possible, but I refuse to believe that considering how simple it is and how easy it would be to implement.

Do I really need to defer to a shell action/script for this?

s1gtrap
  • 162
  • 2
  • 10
  • The fact that you're trying to copy something to the internal dune folder indicates that you are on the wrong path. It looks like a classical XY problem, so can you please update your question with a description of the real problem that you're trying to solve? With that said, `copy_files` will copy files to the current folder, so if you want to have files in `static`, then this stanza should be in a dune file in the `static` folder. If you want to copy files from somewhere to somewhere else, you might need the `rule` stanza with the `copy` action. – ivg Jul 20 '23 at 13:09

0 Answers0