summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:23 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:23 +0000
commit270c73b44ff2fd985b07072944e6b9ab4a460498 (patch)
tree3269ee9cdc1983136ad3eb578797655bd9f0190e
parentec6044c722e8ef5354f236a39ef7d77a19ab70dc (diff)
downloadmgaonline-270c73b44ff2fd985b07072944e6b9ab4a460498.tar
mgaonline-270c73b44ff2fd985b07072944e6b9ab4a460498.tar.gz
mgaonline-270c73b44ff2fd985b07072944e6b9ab4a460498.tar.bz2
mgaonline-270c73b44ff2fd985b07072944e6b9ab4a460498.tar.xz
mgaonline-270c73b44ff2fd985b07072944e6b9ab4a460498.zip
add dist-git
-rw-r--r--Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index cf481a61..216349e8 100644
--- a/Makefile
+++ b/Makefile
@@ -63,14 +63,30 @@ install: all
cleandist:
rm -rf $(PACKAGE)-$(VERSION) ../$(PACKAGE)-$(VERSION).tar.bz2
-localcopy: clean
- svn export -q -rBASE . $(NAME)-$(VERSION)
-tar:
+dis: dist
+dist:
+ @make cleandist
+ 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.lzma is ready)
+
+dist-svn:
+ rm -rf $(NAME)-$(VERSION)
+ svn export -q -rBASE . $(NAME)-$(VERSION)
tar cfa ../$(PACKAGE)-$(VERSION).tar.lzma $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
+ rm -rf $(NAME)-$(VERSION)
+
-dist: cleandist localcopy tar
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | lzma >../$(NAME)-$(VERSION).tar.lzma;
log:changelog