From cac0c17403d9eafdd43dae24df8dbd1ca3632622 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 23 Jan 2009 17:08:52 +0000 Subject: Use separate Makefile rules instead of a big multiline shell statement --- images/Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/images/Makefile b/images/Makefile index 14aa129c4..b1a84ef20 100644 --- a/images/Makefile +++ b/images/Makefile @@ -23,22 +23,26 @@ dist: tar tar: @rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION) @if [ -e ".svn" ]; then \ - mkdir -p $(PRODUCT)-$(VERSION); \ - svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images; \ - svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel; \ - cp ../Makefile.config $(PRODUCT)-$(VERSION)/; \ - tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION); \ - rm -rf $(PRODUCT)-$(VERSION); \ + $(MAKE) dist-svn; \ elif [ -e "../.git" ]; then \ - pushd .. &>/dev/null; \ - git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | bzip2 >images/$(PRODUCT)-$(VERSION).tar.bz2; \ - popd &>/dev/null; \ + $(MAKE) dist-git; \ else \ echo "Unknown SCM (not SVN nor GIT)";\ exit 1; \ fi; $(info $(PRODUCT)-$(VERSION).tar.bz2 is ready) +dist-svn: + mkdir -p $(PRODUCT)-$(VERSION) + svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images + svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel + cp ../Makefile.config $(PRODUCT)-$(VERSION)/ + tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION) + rm -rf $(PRODUCT)-$(VERSION) + +dist-git: + @cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | bzip2 >images/$(PRODUCT)-$(VERSION).tar.bz2; + clean: rm -rf images isolinux all.kernels modules.description find . -name "*~" -o -name ".#*" | xargs rm -f -- cgit v1.2.1