Have a variable to point to installed library paths
Open
@voodoos is already working on this.
Since Apr 28, 2020.
build
c-bindings
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Related to https://github.com/ocaml/dune/issues/1185 but a bit simpler.
In a few places I would like to get the place of where the current library (or one of the already present libraries) is installed. To do this I have come up with this very inelegant solution, which seems to work fine:
(rule
(target install-dir)
(action (with-stdout-to install-dir
(bash "echo $(dirname %{lib:<lib>:META})"))))
And now other rules could just (:include install-dir) when they want to refer to the path where <lib> is installed.
Is there any way to make it simpler? E.g. by expanding %{lib:<lib>} to the parent directory of %{lib:<lib>:META} or %{lib:<lib>:dune-package} ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.