Commit d51539cc authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

build: Rework @dist and @tar generation

Currently our @tar target imples that there
is a tag in form of "vX.X", if such tag is
not present in the repo we're in trouble.

So make it sane

 - if tag present then create tar from this tag
 - if tag is not present simply use git describe helper
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent c1f31142
...@@ -155,11 +155,14 @@ test: zdtm ...@@ -155,11 +155,14 @@ test: zdtm
$(Q) $(MAKE) -C test $(Q) $(MAKE) -C test
PHONY += test PHONY += test
dist: tar tar-name := $(shell git tag -l v$(CRIU_VERSION))
tar: criu-$(CRTOOLSVERSION).tar.bz2 ifeq ($(tar-name),)
criu-$(CRTOOLSVERSION).tar.bz2: tar-name := $(shell git describe)
git archive --format tar --prefix 'criu-$(CRTOOLSVERSION)/' \ endif
v$(CRTOOLSVERSION) | bzip2 > $@ criu-$(tar-name).tar.bz2:
git archive --format tar --prefix 'criu-$(tar-name)/' $(tar-name) | bzip2 > $@
dist tar: criu-$(tar-name).tar.bz2
@true
.PHONY: dist tar .PHONY: dist tar
tags: tags:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment