[opam-devel] What context do install an remove run in?
anil at recoil.org
Mon Sep 7 11:48:36 BST 2015
On 6 Sep 2015, at 19:49, Malcolm Matalka <mmatalka at gmail.com> wrote:
> This is unclear to be from the documentation, but what context to the
> commands `install` and `remove` sections of an opam file run in? I
> would assume `install` runs in the directory of the built source, but
> does `remove` have that same guarantee? Would that also mean that the
> built source is kept around with the package? I ask because I would
> like to simplify my opam files by having a 'make remove' entry.
They run in an unpacked source tree as the pwd. However, this is not
cached across build runs -- instead, the source is freshly unpacked and
made available to the remove target. So you just need to make sure
that you run the `configure` script if relevant.
There's a special case for `ocamlfind remove` that doesn't do this;
this will likely have to be generalised as OPAM moves the OCaml-specific
logic into a separate plugin.
More information about the opam-devel