From 63837c9165089c9b833e985f95fa71664e4fda33 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 7 Oct 2009 12:11:15 +0000 Subject: refactor svn make dist (in preparation for a git make dist) --- Makefile | 16 +++++++++++++--- 1 file 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: -- cgit v1.2.1