qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS
@ 2007-01-22 11:11 Carlo Marcelo Arenas Belon
  2007-01-24 22:58 ` Thiemo Seufer
  0 siblings, 1 reply; 2+ messages in thread
From: Carlo Marcelo Arenas Belon @ 2007-01-22 11:11 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

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

[-- Attachment #2: qemu-snapshot.patch --]
[-- Type: text/plain, Size: 722 bytes --]

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:

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS
  2007-01-22 11:11 [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS Carlo Marcelo Arenas Belon
@ 2007-01-24 22:58 ` Thiemo Seufer
  0 siblings, 0 replies; 2+ messages in thread
From: Thiemo Seufer @ 2007-01-24 22:58 UTC (permalink / raw)
  To: Carlo Marcelo Arenas Belon; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-24 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22 11:11 [Qemu-devel] [PATCH] add a SNAPSHOT flag to be able to generate snapshots from CVS Carlo Marcelo Arenas Belon
2007-01-24 22:58 ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).