aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-23 19:34:23 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-23 19:34:23 +0000
commitee851e77d2be469fae4c64d608263abc58c6e16f (patch)
tree1fa4abb6bb6b42cc9197115a454dc01486a3d929
parent9728dca383168cc02afdbedaca89304b2d38b60a (diff)
downloaduserdrake-ee851e77d2be469fae4c64d608263abc58c6e16f.tar
userdrake-ee851e77d2be469fae4c64d608263abc58c6e16f.tar.gz
userdrake-ee851e77d2be469fae4c64d608263abc58c6e16f.tar.bz2
userdrake-ee851e77d2be469fae4c64d608263abc58c6e16f.tar.xz
userdrake-ee851e77d2be469fae4c64d608263abc58c6e16f.zip
enable to generate tarball from git-svn
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bb692f7..4a5ffe2 100644
--- a/Makefile
+++ b/Makefile
@@ -39,12 +39,28 @@ install: all
dis: dist
dist: clean
+ rm -rf ../$(NAME)-$(VERSION).tar*
+ rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ @if [ -e ".svn" ]; then \
+ $(MAKE) dist-svn; \
+ elif [ -e ".git" ]; then \
+ $(MAKE) dist-git; \
+ else \
+ echo "Unknown SCM (not SVN nor GIT)";\
+ exit 1; \
+ fi;
+ $(info $(NAME)-$(VERSION).tar.xz is ready)
+
+dist-svn:
rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
svn export -q -rBASE . $(NAME)-$(VERSION)
find $(NAME)-$(VERSION) -name .svnignore |xargs rm -rf
tar cfa ../$(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.xz;
+
.PHONY: ChangeLog
ChangeLog:
svn2cl --accum --authors ../../soft/common/username.xml