From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrCbL-0007s0-Kv for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:34:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrCbK-0006jl-Dc for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:34:27 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:41419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrCbK-0006jh-9q for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:34:26 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Jul 2012 14:34:24 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 669E5C9008D for ; Tue, 17 Jul 2012 14:33:35 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6HIXZm7417930 for ; Tue, 17 Jul 2012 14:33:35 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6HIXXso025760 for ; Tue, 17 Jul 2012 15:33:34 -0300 From: Anthony Liguori Date: Tue, 17 Jul 2012 13:33:32 -0500 Message-Id: <1342550012-5697-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH] build: add make dist target (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Michael Roth Let's stop screwing up releases by having a script do the work that Anthony's fat fingers can't seem to get right. Cc: Michael Roth Signed-off-by: Anthony Liguori --- v1 -> v2 - include the scripts for real this time - remove tar/tarbin from PHONY --- Makefile | 19 ++++++++----------- scripts/make-release | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 11 deletions(-) create mode 100755 scripts/make-release diff --git a/Makefile b/Makefile index 9707fa0..abf825d 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ Makefile: ; configure: ; .PHONY: all clean cscope distclean dvi html info install install-doc \ - pdf recurse-all speed tar tarbin test build-all + pdf recurse-all speed test build-all dist $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw) @@ -232,6 +232,13 @@ clean: rm -f $$d/qemu-options.def; \ done +VERSION ?= $(shell cat VERSION) + +dist: qemu-$(VERSION).tar.bz2 + +qemu-%.tar.bz2: + $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" + distclean: clean rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi rm -f config-all-devices.mak @@ -390,15 +397,5 @@ qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ qemu-img.texi qemu-nbd.texi qemu-options.texi \ qemu-monitor.texi qemu-img-cmds.texi -VERSION ?= $(shell cat VERSION) -FILE = qemu-$(VERSION) - -# tar release (use 'make -k tar' on a checkouted tree) -tar: - rm -rf /tmp/$(FILE) - cp -r . /tmp/$(FILE) - cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn - rm -rf /tmp/$(FILE) - # Include automatically generated dependency files -include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) diff --git a/scripts/make-release b/scripts/make-release new file mode 100755 index 0000000..196c755 --- /dev/null +++ b/scripts/make-release @@ -0,0 +1,24 @@ +#!/bin/bash -e +# +# QEMU Release Script +# +# Copyright IBM, Corp. 2012 +# +# Authors: +# Anthony Liguori +# +# This work is licensed under the terms of the GNU GPLv2 or later. +# See the COPYING file in the top-level directory. + +src="$1" +version="$2" +destination=qemu-${version} + +git clone "${src}" ${destination} +pushd ${destination} +git checkout "v${version}" +git submodule update --init +rm -rf .git roms/*/.git +popd +tar cfj ${destination}.tar.bz2 ${destination} +rm -rf ${destination} -- 1.7.5.4