-# Test-boot the image.
-
-test-boot-image:
- rm -f emptydisk
- dd if=/dev/zero of=emptydisk bs=1024 count=1440
- echo 0, | sfdisk -C 80 -H 2 -S 18 emptydisk
- qemu-system-$(host_cpu) \
- -m 384 \
- -kernel $(VMLINUZ) -initrd $(INITRAMFSIMG) \
- -hda emptydisk -boot c
- rm -f emptydisk
+# If you don't want to run all of the tests ('make check') then this
+# will just run libguestfs-test-tool for a quick check. Note this
+# is NOT a substitute for proper testing!
+
+quickcheck:
+ LIBGUESTFS_PATH=appliance \
+ test-tool/libguestfs-test-tool \
+ --helper test-tool/libguestfs-test-tool-helper
+
+# Mostly static binary distribution.
+#
+# Some binaries are relinked partially statically. You can make these
+# binaries "more static" by making sure that as many foo-static
+# packages are installed as possible.
+#
+# We remove the supermin appliance and adjust some directories to make
+# them non-Fedora-specific.
+
+BINTMPDIR = /tmp/libguestfs-bin
+bindist:
+ rm -rf $(BINTMPDIR)
+ mkdir $(BINTMPDIR)
+ $(MAKE)
+ $(MAKE) DESTDIR=$(BINTMPDIR) install
+ rm -r $(BINTMPDIR)$(libdir)/guestfs/supermin.d
+ rm $(BINTMPDIR)$(libdir)/guestfs/kmod.whitelist
+ mv $(BINTMPDIR)$(prefix)/lib64/* $(BINTMPDIR)$(libdir)
+ mv $(BINTMPDIR)/usr/lib64/* $(BINTMPDIR)$(libdir)
+ -find $(BINTMPDIR) -type d -exec rmdir --ignore-fail-on-non-empty {} \;
+ $(MAKE) -C fish guestfish.static
+ cp fish/guestfish.static $(BINTMPDIR)$(bindir)/guestfish
+ $(MAKE) -C fuse guestmount.static
+ cp fuse/guestmount.static $(BINTMPDIR)$(bindir)/guestmount
+ $(MAKE) -C test-tool libguestfs-test-tool.static
+ cp test-tool/libguestfs-test-tool.static $(BINTMPDIR)$(bindir)/libguestfs-test-tool
+ (cd $(BINTMPDIR) && tar cf - .) | \
+ gzip -c -9 > libguestfs-$(VERSION)-$(host_cpu).tar.gz