summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-05 06:13:10 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-05 06:13:10 +0000
commitdb5e24d90bc7844e7a87cf4facd58a6dc92599ad (patch)
tree4a11bb6a8e9fa1f9194944e217f9acea92d5a442
parent60b6e70bfec3b017da11b63f37051e4766bccd2e (diff)
downloadbootloader-utils-db5e24d90bc7844e7a87cf4facd58a6dc92599ad.tar
bootloader-utils-db5e24d90bc7844e7a87cf4facd58a6dc92599ad.tar.gz
bootloader-utils-db5e24d90bc7844e7a87cf4facd58a6dc92599ad.tar.bz2
bootloader-utils-db5e24d90bc7844e7a87cf4facd58a6dc92599ad.tar.xz
bootloader-utils-db5e24d90bc7844e7a87cf4facd58a6dc92599ad.zip
add support for generating archives from git
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 73b3433..c232922 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,18 @@ localcopy:
# rules to build a distributable dist
dist: cleandist
- @make dist-svn
+ @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 $(PACKAGE)-$(VERSION).tar.xz is ready)
+
+dist-git:
+ @git archive --prefix=$(PACKAGE)-$(VERSION)/ HEAD | xz >../$(PACKAGE)-$(VERSION).tar.xz;
dist-svn:
svn export $(SVNROOT)/releases/$(TAG) $(PACKAGE)-$(VERSION)