X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile;h=01242507749f858bb7e3b6f5502a1d5842576e8d;hb=1835c920726e5ce4f012ba1fc4cba0d33c9b316a;hp=4cc99aa3df13479cdcb559a80c805fdc08f65309;hpb=9865567fabbd4cc3eee40c06984d022693c1f38d;p=virt-p2v.git diff --git a/Makefile b/Makefile index 4cc99aa..0124250 100644 --- a/Makefile +++ b/Makefile @@ -19,27 +19,41 @@ BASEREPO := http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora export http_proxy := http://127.0.0.1:3128/ export ftp_proxy := http://127.0.0.1:3128/ +LABEL := virt-p2v-$(VERSION) + #---------------------------------------------------------------------- all: @echo "make build Build the live CD ISO" - @echo "make boot [ISO=foo.iso] Boot the named ISO (uses qemu)" + @echo "make boot [ISO=foo.iso] Boot built/named ISO (uses qemu)" -build: livecd-test.ks - livecd-creator \ - --config=$< \ - --fslabel=virt-p2v-$(VERSION) +build: livecd.ks + rm -f $(LABEL).iso + livecd-creator --config=$< --fslabel=$(LABEL) ls -lhtr *.iso -ISO = virt-p2v-$(VERSION).iso +ISO = $(LABEL).iso boot: - qemu -m 512 $(ISO) + qemu -m 512 -cdrom $(ISO) -livecd-test.ks: livecd-test.ks.in Makefile +livecd.ks: livecd.ks.in livecd-post.sh Makefile sed \ -e 's|@BASEREPO@|$(BASEREPO)|g' \ -e 's|@LANG@|$(LANG)|g' \ -e 's|@KEYBOARD@|$(KEYBOARD)|g' \ -e 's|@TIMEZONE@|$(TIMEZONE)|g' \ - < $< > $@ \ No newline at end of file + < $< | cat - livecd-post.sh > $@ + +livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh inittab Makefile + sed \ + -e '/@P2V.INIT@/ r p2v.init' \ + -e '/@P2V.INIT@/ d' \ + -e '/@VIRT-P2V.SH@/ r virt-p2v.sh' \ + -e '/@VIRT-P2V.SH@/ d' \ + -e '/@INITTAB@/ r inittab' \ + -e '/@INITTAB@/ d' \ + < $< > $@ + +clean: + rm -f *~ core livecd.ks livecd-post.sh