This patch adds a target "tar" in the Makefile of kvm-userspace
to create a tarball of kvm, including kvm kernel modules sources.

Use "make tar"
or  "make LINUX=/usr/src/linux-2.6 tar" to create kvm-snapshot-<date>.tar.gz
    with module sources from /usr/src/linux-2.6
or  "make VERSION=latest" to create "kvm-latest.tar.gz"

Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
---
 Makefile |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 1e59217..3aba0f6 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,23 @@ srpm:
        rpmbuild  --define="_topdir $$(pwd)" -bs $(tmpspec)
        $(RM) $(tmpspec)
 
+VERSION=snapshot-$(shell date +%Y%m%d)
+TARNAME=kvm-$(VERSION)
+LINUX=$(shell pwd)/../kvm
+tar:
+       rm -fr $(TARNAME)
+       mkdir $(TARNAME)
+       (cd $(LINUX) && git log -1 | sed -n "s/^commit \(.*\)/kernel:    \1/p") 
>  $(TARNAME)/SOURCES
+       git log -1 | sed -n "s/^commit \(.*\)/userspace: \1/p" >> 
$(TARNAME)/SOURCES
+       cp config.mak Makefile configure kvm kvm_stat kvm.spec \
+          Makefile.csdemo doxygen.conf $(TARNAME)
+       cp -pr bios drivers qemu user kernel scripts $(TARNAME)
+       make -C $(TARNAME)/kernel LINUX="$(LINUX)" sync
+       make -C $(TARNAME)/bios clean
+       make -C $(TARNAME) clean
+       tar czf $(TARNAME).tar.gz $(TARNAME)
+       rm -fr $(TARNAME)
+
 clean:
        for i in $(if $(WANT_MODULE), kernel) user qemu; do \
                make -C $$i clean; \
-- 
1.5.2.4


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to