make: Make "src-tarball" target actually make a source tarball

At the moment, making a release tarball is an annoyingly manual
process that involves running "git archive" into a temporary directory.

Script this process up and make a target, so that the release manager
can simply type "make src-tarball-release" and have everything show up
nice and neat in dist/xen-$version.tar.gz.  "make src-tarball" will
make a version number based on git describe, which will typically have
the most recent tag, number of commits since that tag, and the git
commit id of the current HEAD.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
This commit is contained in:
George Dunlap authored and Ian Jackson committed 2014-09-23 18:41:27 +01:00
1 parent 1e491e5427
commit d5fb9fb71a
2 files changed
+59 -7

No files matched your search

+21 -7
View File
@@ -143,6 +143,23 @@ subtree-force-update:
subtree-force-update-all:
$(MAKE) -C tools subtree-force-update-all
# Make a source tarball, including qemu sub-trees.
#
# src-tarball will use "git describe" for the version number. This
# will have the most recent tag, number of commits since that tag, and
# git commit id of the head. This is suitable for a "snapshot"
# tarball of an unreleased tree.
#
# src-tarball-release will use "make xenversion" as the version
# number. This is suitable for release tarballs.
.PHONY: src-tarball-release
src-tarball-release: subtree-force-update-all
bash ./tools/misc/mktarball $(XEN_ROOT) $$($(MAKE) -C xen xenversion --no-print-directory)
.PHONY: src-tarball
src-tarball: subtree-force-update-all
bash ./tools/misc/mktarball $(XEN_ROOT) $$(git describe)
.PHONY: clean
clean::
$(MAKE) -C xen clean
@@ -171,13 +188,6 @@ endif
.PHONY: mrproper
mrproper: distclean
# Prepare for source tarball
.PHONY: src-tarball
src-tarball: distclean
$(MAKE) -C xen .banner
rm -rf xen/tools/figlet .[a-z]*
$(MAKE) -C xen distclean
.PHONY: help
help:
@echo 'Installation targets:'
@@ -211,6 +221,10 @@ help:
@echo ' install-tboot - download, build, and install the tboot module'
@echo ' clean-tboot - clean the tboot module if it exists'
@echo
@echo 'Package targets:'
@echo ' src-tarball-release - make a source tarball with xen and qemu tagged with a release'
@echo ' src-tarball - make a source tarball with xen and qemu tagged with git describe'
@echo
@echo 'Environment:'
@echo ' [ this documentation is sadly not complete ]'
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.