From 270c73b44ff2fd985b07072944e6b9ab4a460498 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 27 Jan 2010 17:25:23 +0000 Subject: add dist-git --- Makefile | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.1