summaryrefslogtreecommitdiffstats
path: root/images/Makefile
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-01-23 17:08:52 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-01-23 17:08:52 +0000
commitcac0c17403d9eafdd43dae24df8dbd1ca3632622 (patch)
tree1d85c991c06916d3603fa7b1da0f8d5770827d95 /images/Makefile
parent9acb6bc658a784defa9e3a45408a37bd648755c4 (diff)
downloaddrakx-cac0c17403d9eafdd43dae24df8dbd1ca3632622.tar
drakx-cac0c17403d9eafdd43dae24df8dbd1ca3632622.tar.gz
drakx-cac0c17403d9eafdd43dae24df8dbd1ca3632622.tar.bz2
drakx-cac0c17403d9eafdd43dae24df8dbd1ca3632622.tar.xz
drakx-cac0c17403d9eafdd43dae24df8dbd1ca3632622.zip
Use separate Makefile rules instead of a big multiline shell statement
Diffstat (limited to 'images/Makefile')
-rw-r--r--images/Makefile22
1 files 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