[CRIU] [PATCH] make: Add tarball target
Cyrill Gorcunov
gorcunov at openvz.org
Wed Oct 11 01:03:02 MSK 2017
From: Cyrill Gorcunov <gorcunov at virtuozzo.com>
Sometimes for debug sake we need to build criu from source,
and setting up git on the target machine is not an option,
or due to network slow connection it takes too much time
to upload the whole history. Just pack current HEAD into
a tarball.
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
---
Makefile | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index 796cad874da2..5d1d732ecbcd 100644
--- a/Makefile
+++ b/Makefile
@@ -310,6 +310,14 @@ tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
dist tar: criu-$(tar-name).tar.bz2 ;
.PHONY: dist tar
+ifeq ($(filter-out tarball,$(MAKECMDGOALS)),)
+tarball-prefix := $(shell git describe --always --long)
+tarball-file := criu-$(tarball-prefix).tar.bz2
+endif
+tarball:
+ git archive --format tar --prefix 'criu-$(tarball-prefix)/' HEAD | bzip2 > $(tarball-file)
+.PHONY: tarball
+
TAGS_FILES_REGEXP := . -name '*.[hcS]' ! -path './.*' \( ! -path './test/*' -o -path './test/zdtm/lib/*' \)
tags:
$(call msg-gen, $@)
@@ -356,6 +364,7 @@ TAGS_FILES_REGEXP := . -name '*.[hcS]' ! -path './.*' \( ! -path './test/*' -o -
@echo ' install - Install CRIU (see INSTALL.md)'
@echo ' uninstall - Uninstall CRIU'
@echo ' dist - Create a source tarball'
+ @echo ' tarball - Create a source tarball for current HEAD'
@echo ' clean - Clean most, but leave enough to navigate'
@echo ' mrproper - Delete all compiled/generated files'
@echo ' tags - Generate tags file (ctags)'
--
2.7.5
More information about the CRIU
mailing list