From: Hilko Bengen Date: Wed, 17 Aug 2011 22:14:46 +0000 (+0200) Subject: out-of-tree build: generate ./run from template, fix image checks X-Git-Tag: 1.13.6~4 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=70c033998e0e721dc4f9eb2a20348098b259752c;hp=5d296dfd609fb1aa865109b1040a4d5bf2981e60;ds=sidebyside out-of-tree build: generate ./run from template, fix image checks ./run can now be run in a separate build directory. Since some files needed in the image checks are found in the source tree (but not the build tree), the source tree location is passed to make-*-img.sh via an environment variable. --- diff --git a/.gitignore b/.gitignore index fb04086..a4500fc 100644 --- a/.gitignore +++ b/.gitignore @@ -306,6 +306,7 @@ ruby/ext/guestfs/_guestfs.c ruby/ext/guestfs/_guestfs.so ruby/ext/guestfs/mkmf.log ruby/Rakefile +run src/actions.c src/bindtests.c src/errnostring_gperf.c diff --git a/configure.ac b/configure.ac index 54c2911..e45632d 100644 --- a/configure.ac +++ b/configure.ac @@ -909,6 +909,8 @@ AC_CONFIG_HEADERS([config.h]) dnl http://www.mail-archive.com/automake@gnu.org/msg10204.html AC_CONFIG_FILES([podwrapper.sh], [chmod +x podwrapper.sh]) +AC_CONFIG_FILES([run], + [chmod +x run]) AC_CONFIG_FILES([Makefile appliance/Makefile capitests/Makefile diff --git a/images/Makefile.am b/images/Makefile.am index 68eb550..90c4ce3 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -173,41 +173,39 @@ $(builddir)/test-grep.txt.gz: test-grep.txt fedora.img: guest-aux/make-fedora-img.sh \ guest-aux/fedora-name.db \ guest-aux/fedora-packages.db - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt rm -f $@ $@-t + mkdir -p guest-aux $(DB_LOAD) $@-t < $< mv $@-t $@ guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt rm -f $@ $@-t + mkdir -p guest-aux $(DB_LOAD) $@-t < $< mv $@-t $@ # Make a (dummy) Debian image. debian.img: guest-aux/make-debian-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Make a (dummy) Ubuntu image. ubuntu.img: guest-aux/make-ubuntu-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Make a (dummy) Windows image. windows.img: guest-aux/make-windows-img.sh \ guest-aux/windows-software guest-aux/windows-system - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Since users might not have the tools needed to create this, we diff --git a/images/guest-aux/make-debian-img.sh b/images/guest-aux/make-debian-img.sh index 9a01e93..4b0490d 100755 --- a/images/guest-aux/make-debian-img.sh +++ b/images/guest-aux/make-debian-img.sh @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +../run ../fish/guestfish <