summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-02-13 14:43:48 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-02-13 14:43:48 +0000
commitbd7584c8a0026284041dcd76fd131f122081ba3f (patch)
tree04cbb840ea60fee9c906d6cf12fa5e869ef3f5b0 /Makefile
parent2f0709f61824d35be69f7bea53d3149382a1b70e (diff)
downloadbootloader-theme-bd7584c8a0026284041dcd76fd131f122081ba3f.tar
bootloader-theme-bd7584c8a0026284041dcd76fd131f122081ba3f.tar.gz
bootloader-theme-bd7584c8a0026284041dcd76fd131f122081ba3f.tar.bz2
bootloader-theme-bd7584c8a0026284041dcd76fd131f122081ba3f.tar.xz
bootloader-theme-bd7584c8a0026284041dcd76fd131f122081ba3f.zip
Add git support to make dist (in addition to svn support)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b8c27e5..b32b565 100644
--- a/Makefile
+++ b/Makefile
@@ -85,9 +85,22 @@ UPSTREAM_VERSION = 4.1.19
VERSION = $(UPSTREAM_VERSION).1
dist:
- rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ 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.lzma is ready)
+
+dist-svn:
+ rm -rf $(NAME)-$(VERSION)
svn export -q -rBASE . $(NAME)-$(VERSION)
tar cfY ../$(NAME)-$(VERSION).tar.lzma $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
- \ No newline at end of file
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | lzma >../$(NAME)-$(VERSION).tar.lzma;