summaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/Makefile.am8
-rwxr-xr-xsrc/generator.ml2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 1c0fa0ac..9dc8e990 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,8 +30,10 @@ EXTRA_DIST = \
noinst_DATA = stamp-generator
stamp-generator: generator.ml
- mkdir -p $(top_srcdir)/perl/lib/Sys
- cd .. && ocaml -warn-error A $(srcdir)/src/$<
+ mkdir -p $(top_builddir)/perl/lib/Sys
+ mkdir -p $(top_builddir)/ruby/ext/guestfs
+ mkdir -p $(top_builddir)/java/com/redhat/et/libguestfs
+ cd $(top_builddir) && ocaml -warn-error A ./src/$<
guestfs_protocol.x: stamp-generator
@@ -83,6 +85,8 @@ lib_LTLIBRARIES = libguestfs.la
BUILT_SOURCES = \
guestfs_protocol.x \
+ guestfs_protocol.c \
+ guestfs_protocol.h \
guestfs-structs.h \
guestfs-actions.h \
guestfs-actions.c \
diff --git a/src/generator.ml b/src/generator.ml
index 5c9e1c34..e86fce17 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -8607,7 +8607,7 @@ let output_to filename =
let () =
check_functions ();
- if not (Sys.file_exists "configure.ac") then (
+ if not (Sys.file_exists "config.status") then (
eprintf "\
You are probably running this from the wrong directory.
Run it from the top source directory using the command