Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8wth-00033d-TW for qemu-devel@nongnu.org; Mon, 22 Jan 2007 05:59:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8wtg-00032B-Is for qemu-devel@nongnu.org; Mon, 22 Jan 2007 05:59:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8wtg-00031Z-3v for qemu-devel@nongnu.org; Mon, 22 Jan 2007 05:59:32 -0500 Received: from [66.139.79.212] (helo=tapir.sajinet.com.pe) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H8wtf-0000D1-CT for qemu-devel@nongnu.org; Mon, 22 Jan 2007 05:59:31 -0500 Date: Mon, 22 Jan 2007 05:11:33 -0600 From: Carlo Marcelo Arenas Belon Message-ID: <20070122111133.GC2618@tapir.sajinet.com.pe> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zCKi3GIZzVBPywwA" Content-Disposition: inline Subject: [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --zCKi3GIZzVBPywwA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, The following patch adds a "SNAPSHOT" variable to the Makefile which can be changed to "yes" (or any other value) so that `make -k tar` generates a snapshot tar (on a configured or not CVS tree) instead of a release source tar (useful when debugging a version of the CVS tree) by using a generated version based on the current date through GNU date. Only the name of the tar is changed so to keep all internal logic that relies in the version unchanged. Carlo --zCKi3GIZzVBPywwA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu-snapshot.patch" Index: Makefile =================================================================== RCS file: /sources/qemu/qemu/Makefile,v retrieving revision 1.110 diff -u -r1.110 Makefile --- Makefile 7 Jan 2007 22:04:40 -0000 1.110 +++ Makefile 22 Jan 2007 09:50:17 -0000 @@ -8,6 +8,8 @@ BASE_CFLAGS= BASE_LDFLAGS= +SNAPSHOT= + BASE_CFLAGS += $(OS_CFLAGS) ifeq ($(ARCH),sparc) BASE_CFLAGS += -mcpu=ultrasparc @@ -128,7 +130,15 @@ html: qemu-doc.html qemu-tech.html -FILE=qemu-$(shell cat VERSION) +ifndef VERSION +VERSION=$(shell cat VERSION) +endif + +ifneq ($(SNAPSHOT),) +SNAPSHOT=.$(shell date -u "+%Y%m%d%H%M") +endif + +FILE=qemu-$(VERSION)$(SNAPSHOT) # tar release (use 'make -k tar' on a checkouted tree) tar: --zCKi3GIZzVBPywwA--