summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
Diffstat (limited to 'images')
-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