On Fri, Dec 07, 2018 at 03:09:43PM -0600, Eric Blake wrote:
Rather than always trying to install ocaml files into $(OCAMLLIBS),
which is likely to be root-owned and therefore fail during a
'./configure --prefix=$HOME/subdir', we instead choose to always
install relative to $(prefix) and let distro packagers take steps
post-install to move the distro's pre-built copy into the correct
location for the distro. This fixes a 'make distcheck' failure.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
plugins/ocaml/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/ocaml/Makefile.am b/plugins/ocaml/Makefile.am
index b95f255..bbde5e1 100644
--- a/plugins/ocaml/Makefile.am
+++ b/plugins/ocaml/Makefile.am
@@ -39,7 +39,7 @@ EXTRA_DIST = \
if HAVE_OCAML
-ocamllibdir = $(OCAMLLIB)
+ocamllibdir = $(libdir)/ocaml
ocamllib_DATA = NBDKit.mli NBDKit.cmi NBDKit.cmx NBDKit.o
NBDKit.cmi: NBDKit.mli
I'm actually one of the authors of m4/ocaml.m4. Could that file be
fixed to provide a better $(OCAMLLIB)?
I suspect however the answer will be no. Because what we're really
getting is the output of ‘ocamlc -where’. Unfortunately if people are
using the opam package manager which installs OCaml in your home
directory then ‘ocamlc -where’ will be some directory under $HOME and
entirely unrelated to $(libdir).
Thus I think this patch won't work ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html