out-of-tree build: fix make and make install
authorHilko Bengen <bengen@hilluzination.de>
Tue, 16 Aug 2011 22:42:00 +0000 (00:42 +0200)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 28 Aug 2011 08:13:26 +0000 (09:13 +0100)
$(srcdir) is not needed for guestfs_c.c.
*.mli only exists in $(srcdir) and isn't found on "make install" otherwise
(cherry picked from commit 0938e43a60f9d729d9795cf45498e60217fece0e)

ocaml/Makefile.am

index 7028fa4..8daa671 100644 (file)
@@ -53,7 +53,7 @@ mlguestfs.cmxa: $(XOBJS)
        $(OCAMLMKLIB) -o mlguestfs $^ -L$(top_builddir)/src/.libs -lguestfs
 
 guestfs_c.o: guestfs_c.c
-       $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$<
+       $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $<
 
 guestfs_c_actions.o: guestfs_c_actions.c
        $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$<
@@ -149,7 +149,7 @@ install-data-hook:
        $(OCAMLFIND) install \
          -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
          guestfs \
-         META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli
+         META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli
 
 CLEANFILES += $(noinst_DATA)