From db5e24d90bc7844e7a87cf4facd58a6dc92599ad Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Mar 2013 06:13:10 +0000 Subject: add support for generating archives from git --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 73b3433..c232922 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,18 @@ localcopy: # rules to build a distributable dist dist: cleandist - @make dist-svn + @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 $(PACKAGE)-$(VERSION).tar.xz is ready) + +dist-git: + @git archive --prefix=$(PACKAGE)-$(VERSION)/ HEAD | xz >../$(PACKAGE)-$(VERSION).tar.xz; dist-svn: svn export $(SVNROOT)/releases/$(TAG) $(PACKAGE)-$(VERSION) -- cgit v1.2.1