Manual page with centralised documentation.
[virt-p2v.git] / Makefile
index f2df2a6..6d0a0c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
 # General configuration
 
 PACKAGE  := virt-p2v
-VERSION  := 0.9
+VERSION  := 0.9.1
 
 # i386 images also work on x86-64, so best to stick with i386.
 ARCH     := i386
@@ -53,6 +53,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 man       Make man pages (needs POD)"
 
 # Build live CD.
 
@@ -72,11 +73,15 @@ livecd.ks: livecd.ks.in livecd-post.sh Makefile
          -e 's|@TIMEZONE@|$(TIMEZONE)|g' \
          < $< | cat - livecd-post.sh > $@
 
-livecd-post.sh: livecd-post.sh.in virt-p2v.ml inittab lvm.conf Makefile
+livecd-post.sh: livecd-post.sh.in virt-p2v virt-p2v-update-wrapper iso-attach inittab lvm.conf Makefile
        rm -f $@
        sed \
-         -e '/@VIRT-P2V.ML@/ r virt-p2v.ml' \
-         -e '/@VIRT-P2V.ML@/ d' \
+         -e '/@VIRT-P2V@/ r virt-p2v' \
+         -e '/@VIRT-P2V@/ d' \
+         -e '/@VIRT-P2V-UPDATE-WRAPPER@/ r virt-p2v-update-wrapper' \
+         -e '/@VIRT-P2V-UPDATE-WRAPPER@/ d' \
+         -e '/@ISO-ATTACH@/ r iso-attach' \
+         -e '/@ISO-ATTACH@/ d' \
          -e '/@INITTAB@/ r inittab' \
          -e '/@INITTAB@/ d' \
          -e '/@LVM.CONF@/ r lvm.conf' \
@@ -103,8 +108,8 @@ boot:
 # Update an existing ISO.
 
 update: checkroot checkscript
-       -./update-iso.ml delete $(ISO)
-       ./update-iso.ml add $(ISO) virt-p2v.ml
+       -./iso-attach delete $(ISO)
+       ./iso-attach add $(ISO) virt-p2v
 
 # Check that we are root.
 
@@ -117,7 +122,7 @@ checkroot:
 # Check that the script compiles.
 
 checkscript:
-       ./virt-p2v.ml --test
+       ./virt-p2v --test
 
 # Clean.
 
@@ -142,4 +147,27 @@ check-manifest:
        rm -f .orig-manifest .check-manifest; \
        exit $$rv
 
+# Manual page.
+
+MAN_SECTION := Virtualization Support
+
+man: virt-p2v.1 virt-p2v.1.txt virt-p2v.1.html
+
+virt-p2v.1: virt-p2v.pod
+       pod2man -c "$(MAN_SECTION)" --release "$(PACKAGE)-$(VERSION)" $< > $@
+
+virt-p2v.1.txt: virt-p2v.pod
+       pod2text $< > $@
+
+virt-p2v.1.html: virt-p2v.pod
+       pod2html -css virt-p2v.1.css $< > $@
+
+# Website.
+
+WEBSITE_DIR := ../redhat/et-website/virt-p2v
+
+website: man dist
+       cp virt-p2v.1.html $(WEBSITE_DIR)
+       cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE_DIR)
+
 .PHONY:        build boot checkroot
\ No newline at end of file