Revision 34bb443e

b/Makefile
31 31
configure: ;
32 32

  
33 33
.PHONY: all clean cscope distclean dvi html info install install-doc \
34
	pdf recurse-all speed tar tarbin test
34
	pdf recurse-all speed test dist
35 35

  
36 36
$(call set-vpath, $(SRC_PATH))
37 37

  
......
233 233
	rm -f $$d/qemu-options.def; \
234 234
        done
235 235

  
236
VERSION ?= $(shell cat VERSION)
237

  
238
dist: qemu-$(VERSION).tar.bz2
239

  
240
qemu-%.tar.bz2:
241
	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
242

  
243
VERSION ?= $(shell cat VERSION)
244

  
245
dist: qemu-$(VERSION).tar.bz2
246

  
247
qemu-%.tar.bz2:
248
	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
249

  
236 250
distclean: clean
237 251
	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
238 252
	rm -f config-all-devices.mak
......
391 405
	qemu-img.texi qemu-nbd.texi qemu-options.texi \
392 406
	qemu-monitor.texi qemu-img-cmds.texi
393 407

  
394
VERSION ?= $(shell cat VERSION)
395
FILE = qemu-$(VERSION)
396

  
397
# tar release (use 'make -k tar' on a checkouted tree)
398
tar:
399
	rm -rf /tmp/$(FILE)
400
	cp -r . /tmp/$(FILE)
401
	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
402
	rm -rf /tmp/$(FILE)
403

  
404
# Add a dependency on the generated files, so that they are always
405
# rebuilt before other object files
406
Makefile: $(GENERATED_HEADERS)
407

  
408 408
# Include automatically generated dependency files
409 409
# All subdir dependencies come automatically from our recursive subdir rules
410 410
-include $(wildcard *.d)
b/scripts/make-release
1
#!/bin/bash -e
2
#
3
# QEMU Release Script
4
#
5
# Copyright IBM, Corp. 2012
6
#
7
# Authors:
8
#  Anthony Liguori <aliguori@us.ibm.com>
9
#
10
# This work is licensed under the terms of the GNU GPLv2 or later.
11
# See the COPYING file in the top-level directory.
12

  
13
src="$1"
14
version="$2"
15
destination=qemu-${version}
16

  
17
git clone "${src}" ${destination}
18
pushd ${destination}
19
git checkout "v${version}"
20
git submodule update --init
21
rm -rf .git roms/*/.git
22
popd
23
tar cfj ${destination}.tar.bz2 ${destination}
24
rm -rf ${destination}

Also available in: Unified diff