From edb2b06c6592d109b7ed2d3643f9f8f6ccbb9e90 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 28 Apr 2009 13:09:05 +0000 Subject: Add make dist target --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d3b352b..0053454 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,28 @@ check: clean: find -name '*~' -exec rm {} \; +dist: dis +dis: clean + rm -f ../$(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) + +dist-git: + @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.lzma; + .PHONY: ChangeLog log changelog log: ChangeLog -- cgit v1.2.1