summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-06-05 11:15:51 +0000
committerOlivier Blin <oblin@mandriva.com>2009-06-05 11:15:51 +0000
commitf5c0b6df796b48ec739acfbac70fe70ff5449674 (patch)
treef0aa6f1ddec153d69be5c989d88e0ae14fefc606
parent25dbdd5a0c44ae29a66d0d9bd35fd049794a7635 (diff)
downloaddrakx-kbd-mouse-x11-f5c0b6df796b48ec739acfbac70fe70ff5449674.tar
drakx-kbd-mouse-x11-f5c0b6df796b48ec739acfbac70fe70ff5449674.tar.gz
drakx-kbd-mouse-x11-f5c0b6df796b48ec739acfbac70fe70ff5449674.tar.bz2
drakx-kbd-mouse-x11-f5c0b6df796b48ec739acfbac70fe70ff5449674.tar.xz
drakx-kbd-mouse-x11-f5c0b6df796b48ec739acfbac70fe70ff5449674.zip
Add git support to make dist/dis
Small cleanups in make dist-svn (backport from trunk)
-rw-r--r--Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6ecddd9..bdd7e0e 100644
--- a/Makefile
+++ b/Makefile
@@ -44,14 +44,30 @@ 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
+ tar jcf ../$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | bzip2 >../$(NAME)-$(VERSION).tar.bz2;
+
+
+
.PHONY: ChangeLog
log: ChangeLog