Patchwork build: add make dist target

login
register
mail settings
Submitter Anthony Liguori
Date July 17, 2012, 6:16 p.m.
Message ID <1342549014-5025-1-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/171538/
State New
Headers show

Comments

Anthony Liguori - July 17, 2012, 6:16 p.m.
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 <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)
Peter Maydell - July 17, 2012, 6:23 p.m.
On 17 July 2012 19:16, Anthony Liguori <aliguori@us.ibm.com> wrote:
> 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 <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  Makefile |   19 ++++++++-----------
>  1 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9707fa0..7fe5558 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 tar tarbin 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,%,$@)"
> +

...no scripts/make-release in this patch?

>  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)
> -

...deletes 'tar' target but it is still in the .PHONY list.

-- PMM

Patch

diff --git a/Makefile b/Makefile
index 9707fa0..7fe5558 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 tar tarbin 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)