[Libguestfs] [PATCH] Bugfix: ocaml: Rebuild the tests from source if the main library changes

Richard W.M. Jones rjones at redhat.com
Wed Jul 29 11:47:59 UTC 2009


There's a missing dependency in the ocaml subdirectory which causes
this error whenever the main library changes:

ocamlfind ocamlopt -cclib -L../src/.libs -I . unix.cmxa mlguestfs.cmxa t/guestfs_005_load.cmx -o t/guestfs_005_load
File "_none_", line 1, characters 0-1:
Error: Files t/guestfs_005_load.cmx and mlguestfs.cmxa
       make inconsistent assumptions over interface Guestfs
make[3]: *** [t/guestfs_005_load] Error 2

The attached patch adds the missing dep to fix this.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
-------------- next part --------------
>From 2d5b0e7599b456d6817b0f225f5ed4ce4795d043 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at trick.home.annexia.org>
Date: Wed, 29 Jul 2009 12:45:11 +0100
Subject: [PATCH] ocaml: Rebuild the tests from source if the main library changes.

---
 ocaml/Makefile.am |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index e4a0a73..12522f2 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -76,6 +76,11 @@ t/guestfs_060_readdir: t/guestfs_060_readdir.cmx mlguestfs.cmxa
 	mkdir -p t
 	$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
 
+# Need to rebuild the tests from source if the main library has
+# changed at all, otherwise we get inconsistent assumptions.
+t/%.cmx: t/%.ml mlguestfs.cmxa
+	$(OCAMLFIND) ocamlopt -c $< -o $@
+
 .mli.cmi:
 	$(OCAMLFIND) ocamlc -c $< -o $@
 .ml.cmo:
-- 
1.6.2.5



More information about the Libguestfs mailing list