From ef15b8b2d81ac219ce54ad3e1d8ad674bf51f326 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 25 Jan 2012 18:29:34 +0000 Subject: (dist-git) introduce & use it --- rescue/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'rescue/Makefile') diff --git a/rescue/Makefile b/rescue/Makefile index 449b6d865..e9591c927 100644 --- a/rescue/Makefile +++ b/rescue/Makefile @@ -22,8 +22,20 @@ dist-svn: tar cfa $(PRODUCT)-$(VERSION).tar.xz $(PRODUCT)-$(VERSION) rm -rf $(PRODUCT)-$(VERSION) +dist-git: + @cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD rescue tools/install-xml-file-list Makefile.config | xz >$(PRODUCT)-$(VERSION).tar.xz; + tar: - @make dist-svn + rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(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 $(PRODUCT)-$(VERSION).tar.xz is ready) clean: rm -f $(RESCUE) kernel_read_part -- cgit v1.2.1