aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 686c54f..3262e63 100644
--- a/Makefile
+++ b/Makefile
@@ -20,11 +20,21 @@ install:
dis: dist
dist: clean
- rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+dist:
+ rm -rf ../$(NAME)-$(VERSION).tar*
+ @if [ -e ".svn" ]; then \
+ $(MAKE) dist-svn; \
+ else \
+ echo "Unknown SCM (not SVN nor GIT)";\
+ exit 1; \
+ fi;
+ $(info $(NAME)-$(VERSION).tar.bz2 is ready)
+
+dist-svn:
+ rm -rf $(NAME)-$(VERSION)
svn export -q -rBASE . $(NAME)-$(VERSION)
find $(NAME)-$(VERSION) -name .cvsignore |xargs rm -rf
- tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
- bzip2 -9f ../$(NAME)-$(VERSION).tar
+ tar jcf ../$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
clean: