summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-04-22 13:56:21 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-04-22 13:56:21 +0000
commit6fac0a81e2971f72cbc1a03add372836240e4301 (patch)
tree1df85a40e132cca607c3e65f1e9fadd42da2c2ba
parent3497b97cbe7254584b500be9042e8d70b4b142ce (diff)
downloaddraklive-install-6fac0a81e2971f72cbc1a03add372836240e4301.tar
draklive-install-6fac0a81e2971f72cbc1a03add372836240e4301.tar.gz
draklive-install-6fac0a81e2971f72cbc1a03add372836240e4301.tar.bz2
draklive-install-6fac0a81e2971f72cbc1a03add372836240e4301.tar.xz
draklive-install-6fac0a81e2971f72cbc1a03add372836240e4301.zip
Add git support to make dist
-rw-r--r--Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 22d2ab6..180e867 100644
--- a/Makefile
+++ b/Makefile
@@ -11,12 +11,27 @@ install:
install -d $(dli_sysconfigdir)
make -C po install
+dist: dis
dis: clean
- rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ rm -rf ../$(NAME)-$(VERSION)*.tar* $(NAME)-$(VERSION)
+ @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.lzma is ready)
+
+dist-svn:
svn export -q -rBASE . $(NAME)-$(VERSION)
find $(NAME)-$(VERSION) -name .svnignore |xargs rm -rf
- tar cfY ../$(NAME)-$(VERSION).tar.lzma $(NAME)-$(VERSION)
- rm -rf $(NAME)-$(VERSION)
+ tar cfY ../$(NAME)-$(VERSION).tar.lzma $(NAME)-$(VERSION)
+ rm -rf $(NAME)-$(VERSION)
+
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.lzma;
check:
perl -cw $(NAME)