tests: Rename extratests -> tests/extra.
[libguestfs.git] / images / Makefile.am
index 97fccce..e413750 100644 (file)
@@ -13,7 +13,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 include $(top_srcdir)/subdir-rules.mk
 
@@ -39,9 +39,11 @@ EXTRA_DIST = \
        test-grep.txt \
        guest-aux/make-debian-img.sh \
        guest-aux/debian-packages \
-       guest-aux/make-fedora-img.sh \
+       guest-aux/make-fedora-img.pl \
        guest-aux/fedora-name.db.txt \
        guest-aux/fedora-name.db \
+       guest-aux/fedora-packages.db.txt \
+       guest-aux/fedora-packages.db \
        guest-aux/make-ubuntu-img.sh \
        guest-aux/make-windows-img.sh \
        guest-aux/windows-software \
@@ -54,7 +56,7 @@ noinst_DATA = test.iso
 
 # This is 'check_DATA' because we don't need it until 'make check'
 # time and we need the tools we have built in order to make it.
-check_DATA = debian.img fedora.img ubuntu.img windows.img
+check_DATA = debian.img fedora.img fedora-md1.img fedora-md2.img ubuntu.img windows.img
 
 CLEANFILES = \
        test.iso test.sqsh \
@@ -168,36 +170,52 @@ $(builddir)/test-grep.txt.gz: test-grep.txt
        mv $@-t $@
 
 # Make a (dummy) Fedora image.
-fedora.img: guest-aux/make-fedora-img.sh \
+fedora.img: guest-aux/make-fedora-img.pl \
                guest-aux/fedora-name.db \
                guest-aux/fedora-packages.db
-       LIBGUESTFS_PATH=../appliance \
-       LD_LIBRARY_PATH=../src/.libs \
-       bash $<
+       TMPDIR=$(top_builddir) \
+       SRCDIR=$(srcdir) \
+       LAYOUT=partitions \
+       ../run $<
+
+# Make a (dummy) Fedora image using md devices
+fedora-md1.img fedora-md2.img: guest-aux/make-fedora-img.pl \
+               guest-aux/fedora-name.db \
+               guest-aux/fedora-packages.db
+       TMPDIR=$(top_builddir) \
+       SRCDIR=$(srcdir) \
+       LAYOUT=partitions-md \
+       ../run $<
 
 guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt
-       $(DB_LOAD) $@ < $<
+       rm -f $@ $@-t
+       mkdir -p guest-aux
+       $(DB_LOAD) $@-t < $<
+       mv $@-t $@
 
 guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt
-       $(DB_LOAD) $@ < $<
+       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=../appliance \
-       LD_LIBRARY_PATH=../src/.libs \
+       TMPDIR=$(top_builddir) \
+       SRCDIR=$(srcdir) \
        bash $<
 
 # Make a (dummy) Ubuntu image.
 ubuntu.img: guest-aux/make-ubuntu-img.sh
-       LIBGUESTFS_PATH=../appliance \
-       LD_LIBRARY_PATH=../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=../appliance \
-       LD_LIBRARY_PATH=../src/.libs \
+       TMPDIR=$(top_builddir) \
+       SRCDIR=$(srcdir) \
        bash $<
 
 # Since users might not have the tools needed to create this, we