summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-02-10 10:06:08 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-02-10 10:06:49 +0000
commit39625b59ee5aeecfb855575abb939934216eeff2 (patch)
treee1fd006ab996c486a8802707519cb6a9ab1f2fe3
parentdf3c6acacdedd4e158ae8ca8bb7c175ab4170147 (diff)
downloadlibguestfs-39625b59ee5aeecfb855575abb939934216eeff2.tar.gz
libguestfs-39625b59ee5aeecfb855575abb939934216eeff2.tar.xz
libguestfs-39625b59ee5aeecfb855575abb939934216eeff2.zip
ocaml: Ensure bindings are recompiled whenever there is an API change.
-rw-r--r--ocaml/Makefile.am10
1 files changed, 3 insertions, 7 deletions
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index c512d0ba..c3135329 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -163,22 +163,18 @@ t/guestfs_400_progress.opt: t/guestfs_400_progress.cmx mlguestfs.cmxa
mkdir -p t
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
-# Need to rebuild the tests from source if the main library has
-# changed at all, otherwise we get inconsistent assumptions.
+# Explicit rules for this test which requires 'threads' package.
t/guestfs_070_threads.cmo: t/guestfs_070_threads.ml mlguestfs.cma
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package unix,threads -thread -linkpkg -c $< -o $@
t/guestfs_070_threads.cmx: t/guestfs_070_threads.ml mlguestfs.cmxa
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -package unix,threads -thread -linkpkg -c $< -o $@
-t/%.cmx: t/%.ml mlguestfs.cmxa
- $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -package unix -linkpkg -c $< -o $(builddir)/$@
-
%.cmi: %.mli
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package unix -c $< -o $(builddir)/$@
-%.cmo: %.ml
+%.cmo: %.ml mlguestfs.cma
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package unix -c $< -o $(builddir)/$@
-%.cmx: %.ml
+%.cmx: %.ml mlguestfs.cmxa
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -package unix -c $< -o $(builddir)/$@
depend: .depend