aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-24 15:37:22 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-24 15:37:22 +0000
commit678a668da15ab16bbcdf45d61ee32eb20b58d47f (patch)
treee59fca49d2722dc07454c67fa9368152ad9eb38b
parent523c3a7fe913a448ef872924d69c733074442360 (diff)
downloadiurt-678a668da15ab16bbcdf45d61ee32eb20b58d47f.tar
iurt-678a668da15ab16bbcdf45d61ee32eb20b58d47f.tar.gz
iurt-678a668da15ab16bbcdf45d61ee32eb20b58d47f.tar.bz2
iurt-678a668da15ab16bbcdf45d61ee32eb20b58d47f.tar.xz
iurt-678a668da15ab16bbcdf45d61ee32eb20b58d47f.zip
(dist-git) enable to generate tarball from git
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 198bf22..872fd69 100644
--- a/Makefile
+++ b/Makefile
@@ -23,13 +23,26 @@ install:
tar: dist
-dist: dist-svn
+dist:
+ rm -rf ../$(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:
svn export -q -rBASE . $(PACKAGE)-$(VERSION)
tar cfa $(PACKAGE)-$(VERSION).tar.xz $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
+dist-git:
+ git archive --prefix $(NAME)-$(VERSION)/ HEAD | xz -9 > ../$(NAME)-$(VERSION).tar.xz
+
clean:
rm -rf svn