summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 44818ffc..3a56b5b5 100644
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,16 @@ clean:
dist: clean
find . -maxdepth 2 -name '*.p[lm]' -print0 | xargs -t -0 -n1 perl -cw \
-I/usr/lib/libDrakX > /dev/null 2>&1
- $(MAKE) dist-svn
+ 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.xz is ready)
dist-svn:
rm -rf $(NAME)-$(VERSION)
@@ -71,6 +80,9 @@ dist-svn:
tar cfa ../$(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.xz;
+
log: changelog
changelog:
( svn2cl --authors=../../common/username --accum ; \