Don't remove the pxeboot tarball.
[virt-p2v.git] / Makefile.in
index 75395e6..f2a437b 100644 (file)
 #----------------------------------------------------------------------
 # General configuration
 
-PACKAGE  := @PACKAGE_NAME@
-VERSION  := @PACKAGE_VERSION@
+PACKAGE                := @PACKAGE_NAME@
+VERSION                := @PACKAGE_VERSION@
 
-HAVE_PERLDOC := @HAVE_PERLDOC@
-HAVE_QEMU := @HAVE_QEMU@
-HAVE_QEMU_KVM := @HAVE_QEMU_KVM@
+INSTALL                := @INSTALL@
+
+HAVE_PERLDOC   := @HAVE_PERLDOC@
+HAVE_QEMU      := @HAVE_QEMU@
+HAVE_QEMU_KVM  := @HAVE_QEMU_KVM@
 HAVE_LIVECD_CREATOR := @HAVE_LIVECD_CREATOR@
+HAVE_LIVECD_ISO_TO_PXEBOOT := @HAVE_LIVECD_ISO_TO_PXEBOOT@
 
-LABEL   := $(PACKAGE)-$(VERSION)
-ISO     := $(LABEL).iso
+LABEL          := $(PACKAGE)-$(VERSION)
+ISO            := $(LABEL).iso
 
 #----------------------------------------------------------------------
 
@@ -40,6 +43,7 @@ all:
        @echo "                 Boot built/named ISO (uses qemu)"
        @echo "make update    Update an existing live CD ISO with new"
        @echo "                 virt-p2v script, without doing full rebuild"
+       @echo "make pxe       Build a PXE image (in tftpboot/ subdirectory)"
        @echo "make man       Make man pages (needs POD)"
 
 # Build live CD.
@@ -82,9 +86,18 @@ endif
 # Update an existing ISO.
 
 update: checkroot checkscript
-       -./iso-attach delete $(ISO)
+       -./iso-attach delete $(ISO) 2>/dev/null
        ./iso-attach add $(ISO) virt-p2v
 
+# PXE boot.
+
+ifeq ($(HAVE_LIVECD_ISO_TO_PXEBOOT),livecd-iso-to-pxeboot)
+
+pxe: checkroot checkscript
+       livecd-iso-to-pxeboot $(ISO)
+
+endif
+
 # Check that we are root.
 
 checkroot:
@@ -101,7 +114,13 @@ checkscript:
 # Clean.
 
 clean:
-       rm -f *~ core livecd.ks livecd-post.sh
+       rm -f *~ core p2v.ks pod2htm*
+
+distclean: clean
+       rm -rf autom4te.cache config.log config.status configure
+
+reallyreallyclean: distclean
+       rm -f virt-p2v-*.tar.gz virt-p2v-*.iso
 
 # Manifest.
 
@@ -110,6 +129,7 @@ dist:
        rm -rf $(PACKAGE)-$(VERSION)
        mkdir $(PACKAGE)-$(VERSION)
        tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
+       $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
        tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
        rm -rf $(PACKAGE)-$(VERSION)
        ls -l $(PACKAGE)-$(VERSION).tar.gz
@@ -149,4 +169,22 @@ website: man dist
        cp virt-p2v.1.css $(WEBSITE_DIR)
        cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE_DIR)
 
+# Upload everything.
+
+upload: upload_iso upload_pxe
+
+# Upload ISO.
+
+upload_iso:
+       scp -l 300 $(ISO) et.redhat.com:public_html/tmp/
+
+# Upload PXE image.
+
+PXE_TAR := $(PACKAGE)-$(VERSION)-pxeboot.tar
+
+upload_pxe:
+       tar cf $(PXE_TAR) tftpboot
+       scp -l 300 $(PXE_TAR) et.redhat.com:public_html/tmp/
+#      rm $(PXE_TAR)
+
 .PHONY:        build boot checkroot
\ No newline at end of file