From bd7584c8a0026284041dcd76fd131f122081ba3f Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 13 Feb 2009 14:43:48 +0000 Subject: Add git support to make dist (in addition to svn support) --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b8c27e5..b32b565 100644 --- a/Makefile +++ b/Makefile @@ -85,9 +85,22 @@ UPSTREAM_VERSION = 4.1.19 VERSION = $(UPSTREAM_VERSION).1 dist: - rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar* + 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 cfY ../$(NAME)-$(VERSION).tar.lzma $(NAME)-$(VERSION) rm -rf $(NAME)-$(VERSION) - \ No newline at end of file +dist-git: + @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | lzma >../$(NAME)-$(VERSION).tar.lzma; -- cgit v1.2.1