summaryrefslogtreecommitdiffstats
path: root/ocaml
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2009-07-03 11:52:50 +0100
committerMatthew Booth <mbooth@redhat.com>2009-07-03 16:16:51 +0100
commit349814e9d912c4f372b8fbdfb10b03749911021f (patch)
tree7168b6ee4dadd363a28a73e2a5ff26799395d75c /ocaml
parent5f9cb51f11879ece8b921d833850505d7e57d339 (diff)
downloadlibguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.tar.gz
libguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.tar.xz
libguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.zip
Make it possible to build in a separate directory
This patch allows you to do: mkdir build cd build ../configure ... make This will output all generated files to the build directory. Given that autogen automatically runs configure, you can also do: BUILDDIR=./build ./autogen.sh which will do the right thing. Also: * Fix a dependency bug which means that guestfs_protocol.h isn't automatically rebuilt. * Re-running autogen.sh with no arguments won't blow away your previous configure arguments.
Diffstat (limited to 'ocaml')
-rw-r--r--ocaml/Makefile.am8
1 files changed, 6 insertions, 2 deletions
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index bed1f929..bf9760c3 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -39,10 +39,10 @@ mlguestfs.cmxa: guestfs_c.o guestfs_c_actions.o guestfs.cmx
$(OCAMLMKLIB) -o mlguestfs $^ -L$(top_builddir)/src/.libs -lguestfs
guestfs_c.o: guestfs_c.c
- $(CC) $(CFLAGS) -I$(OCAMLLIB) -I$(top_builddir)/src -fPIC -Wall -c $<
+ $(CC) $(CFLAGS) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml -I$(top_srcdir)/src -I$(top_builddir)/src -fPIC -Wall -c $<
guestfs_c_actions.o: guestfs_c_actions.c
- $(CC) $(CFLAGS) -I$(OCAMLLIB) -I$(top_builddir)/src -fPIC -Wall -c $<
+ $(CC) $(CFLAGS) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml -I$(top_srcdir)/src -I$(top_builddir)/src -fPIC -Wall -c $<
TESTS_ENVIRONMENT = \
LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
@@ -60,15 +60,19 @@ bindtests: bindtests.ml mlguestfs.cmxa
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
t/guestfs_005_load: t/guestfs_005_load.ml mlguestfs.cmxa
+ mkdir -p t
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
t/guestfs_010_launch: t/guestfs_010_launch.ml mlguestfs.cmxa
+ mkdir -p t
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
t/guestfs_050_lvcreate: t/guestfs_050_lvcreate.ml mlguestfs.cmxa
+ mkdir -p t
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
t/guestfs_060_readdir: t/guestfs_060_readdir.ml mlguestfs.cmxa
+ mkdir -p t
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . unix.cmxa mlguestfs.cmxa $< -o $@
.mli.cmi: