summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-04-22 13:55:29 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-04-22 13:55:29 +0000
commitd945e62bac8d3a68c949c697f25a609c80f9c7bc (patch)
tree75d720a0d361ba44327b9c55d9b5a633820d6dd9
parent75f1f52cfb0411e995e6d005daae0c9d7d992507 (diff)
downloaddrak3d-d945e62bac8d3a68c949c697f25a609c80f9c7bc.tar
drak3d-d945e62bac8d3a68c949c697f25a609c80f9c7bc.tar.gz
drak3d-d945e62bac8d3a68c949c697f25a609c80f9c7bc.tar.bz2
drak3d-d945e62bac8d3a68c949c697f25a609c80f9c7bc.tar.xz
drak3d-d945e62bac8d3a68c949c697f25a609c80f9c7bc.zip
Add git support to make dist
-rw-r--r--Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f24bef5..f68c9a9 100644
--- a/Makefile
+++ b/Makefile
@@ -38,11 +38,26 @@ install:
clean:
make -C po clean
+dist: dis
dis:
- rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ rm -rf ../$(NAME)-$(VERSION)*.tar* $(NAME)-$(VERSION)
+ @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:
svn export -q -rBASE . $(NAME)-$(VERSION)
- tar cjf ../$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
- rm -rf $(NAME)-$(VERSION)
+ tar cjf ../$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
+ rm -rf $(NAME)-$(VERSION)
+
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | bzip2 >../$(NAME)-$(VERSION).tar.bzip2;
.PHONY: ChangeLog log changelog