summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-04-27 16:59:50 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-04-27 16:59:50 +0000
commit92336b693eda9c7b1f5a194ce3b3e358cacfa4b1 (patch)
tree5702406135589bd4c2453d764bd3a98a7363d8e5 /Makefile
parent89e40e010f736088a86589a62ce5641be717e480 (diff)
downloaddrakx-kbd-mouse-x11-92336b693eda9c7b1f5a194ce3b3e358cacfa4b1.tar
drakx-kbd-mouse-x11-92336b693eda9c7b1f5a194ce3b3e358cacfa4b1.tar.gz
drakx-kbd-mouse-x11-92336b693eda9c7b1f5a194ce3b3e358cacfa4b1.tar.bz2
drakx-kbd-mouse-x11-92336b693eda9c7b1f5a194ce3b3e358cacfa4b1.tar.xz
drakx-kbd-mouse-x11-92336b693eda9c7b1f5a194ce3b3e358cacfa4b1.zip
Add git support to make dist/dis
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6ecddd9..3b81161 100644
--- a/Makefile
+++ b/Makefile
@@ -44,14 +44,32 @@ install:
clean:
make -C po clean
-dis:
- rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+dis: dist
+dist:
+ 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.bz2 is ready)
+
+dist-svn:
+ rm -rf $(NAME)-$(VERSION)
svn export -q -rBASE . $(NAME)-$(VERSION)
find $(NAME)-$(VERSION) -name .cvsignore |xargs rm -rf
tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
bzip2 -9f ../$(NAME)-$(VERSION).tar
rm -rf $(NAME)-$(VERSION)
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | bzip2 >../$(NAME)-$(VERSION).tar.bz2;
+
+
+
.PHONY: ChangeLog
log: ChangeLog