[Pkg-libvirt-commits] [libguestfs] 15/34: More fixes for situations where ocamlopt is not available

Hilko Bengen bengen at moszumanska.debian.org
Fri Mar 7 10:39:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 876983365a508ad0aac7cddab8c5badfb1da2988
Author: Hilko Bengen <bengen at hilluzination.de>
Date:   Fri Feb 28 19:58:04 2014 +0100

    More fixes for situations where ocamlopt is not available
    
    - run bindtests.opt only if available
    - use ocamlc -custom
    - Don't try to install native code if it hasn't been built (Thanks to Olaf Hering)
---
 mllib/Makefile.am          |  2 +-
 ocaml/Makefile.am          |  7 ++++++-
 ocaml/examples/Makefile.am | 11 ++++-------
 ocaml/run-bindtests        |  2 ++
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/mllib/Makefile.am b/mllib/Makefile.am
index 2e35d1e..0e317b2 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
@@ -176,7 +176,7 @@ common_utils_tests: common_gettext.cmx common_utils.cmx common_utils_tests.cmx
 else
 common_utils_tests: common_gettext.cmo common_utils.cmo common_utils_tests.cmo
 	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
-	  mlguestfs.cma -linkpkg $^ -cclib -lncurses -o $@
+	  mlguestfs.cma -linkpkg $^ -cclib -lncurses -custom -o $@
 endif
 
 TESTS_ENVIRONMENT = $(top_builddir)/run --test
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 708b2e7..7c8e515 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -171,13 +171,18 @@ depend: .depend
 SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
 
 # Do the installation by hand, because we want to run ocamlfind.
+data_hook_files = META *.so *.a *.cma *.cmi $(srcdir)/*.mli
+if HAVE_OCAMLOPT
+data_hook_files += *.cmx *.cmxa
+endif
+
 install-data-hook:
 	mkdir -p $(DESTDIR)$(OCAMLLIB)
 	mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
 	$(OCAMLFIND) install \
 	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
 	  guestfs \
-	  META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli
+	  $(data_hook_files)
 	rm $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.*
 	rm $(DESTDIR)$(OCAMLLIB)/guestfs/libguestfsocaml.a
 
diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am
index 472e180..de647fc 100644
--- a/ocaml/examples/Makefile.am
+++ b/ocaml/examples/Makefile.am
@@ -58,16 +58,13 @@ inspect_vm: inspect_vm.ml
 	$(OCAMLFIND) ocamlopt $(OCAMLFINDFLAGS) -package unix -linkpkg \
           -warn-error A -I .. mlguestfs.cmxa $< -o $@
 else
-
-# This avoids:
-#   Error: Error on dynamically loaded library: ../dllmlguestfs.so: libguestfs.so.0: cannot open shared object file: No such file or directory
 create_disk: create_disk.ml
-	$(top_builddir)/run $(OCAMLFIND) ocamlc $(OCAMLFINDFLAGS) -package unix -linkpkg \
-          -warn-error A -I .. mlguestfs.cma $< -o $@
+	$(OCAMLFIND) ocamlc $(OCAMLFINDFLAGS) -package unix -linkpkg \
+          -warn-error A -I .. mlguestfs.cma -custom $< -o $@
 
 inspect_vm: inspect_vm.ml
-	$(top_builddir)/run $(OCAMLFIND) ocamlc $(OCAMLFINDFLAGS) -package unix -linkpkg \
-          -warn-error A -I .. mlguestfs.cma $< -o $@
+	$(OCAMLFIND) ocamlc $(OCAMLFINDFLAGS) -package unix -linkpkg \
+          -warn-error A -I .. mlguestfs.cma -custom $< -o $@
 endif
 
 endif
diff --git a/ocaml/run-bindtests b/ocaml/run-bindtests
index 3b73e8d..1fa54ec 100755
--- a/ocaml/run-bindtests
+++ b/ocaml/run-bindtests
@@ -21,5 +21,7 @@ set -e
 ./bindtests.bc > bindtests.tmp
 diff -u $srcdir/../bindtests bindtests.tmp
 
+test -x ./bindtests.opt || exit 0
+
 ./bindtests.opt > bindtests.tmp
 diff -u $srcdir/../bindtests bindtests.tmp

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list