From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9r9G-0000Jk-AD for qemu-devel@nongnu.org; Wed, 24 Jan 2007 18:03:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9r9E-0000JW-AH for qemu-devel@nongnu.org; Wed, 24 Jan 2007 18:03:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9r9E-0000JT-5D for qemu-devel@nongnu.org; Wed, 24 Jan 2007 18:03:20 -0500 Received: from phoenix.bawue.net ([193.7.176.60] helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9r9D-0003Gw-Cq for qemu-devel@nongnu.org; Wed, 24 Jan 2007 18:03:19 -0500 Date: Wed, 24 Jan 2007 22:58:50 +0000 Subject: Re: [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS Message-ID: <20070124225850.GA19127@networkno.de> References: <20070122111133.GC2618@tapir.sajinet.com.pe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070122111133.GC2618@tapir.sajinet.com.pe> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carlo Marcelo Arenas Belon Cc: qemu-devel@nongnu.org Carlo Marcelo Arenas Belon wrote: > 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 > 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 This doesn't work as intended, the SNAPSHOT won't expand to date because it was overridden from the command line. I made VERSION overridable instead, this allows to achieve the same effect. Thiemo