summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
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)