From 9143183a31b97d64b6936af770d6ee503bf49bc2 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 7 Apr 2009 13:55:54 +0000 Subject: Uglify make dist --- mdk-stage1/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mdk-stage1') diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index 2e0c14d04..8ef5667e2 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -200,8 +200,20 @@ probe-modules: probe-modules.o probing-FULL.o modules-FULL.o params-FULL.o utils $(DIET) $(CC) $(LDFLAGS) -o $@ $^ $(STRIPCMD) $@ +dist: tar tar: 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 $(NAME)-$(VERSION).tar.bz2 is ready) + +dist-svn: mkdir -p $(PRODUCT)-$(VERSION) svn export -q -rBASE . $(PRODUCT)-$(VERSION)/mdk-stage1 svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel @@ -209,6 +221,9 @@ tar: tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION) rm -rf $(PRODUCT)-$(VERSION) +dist-git: + @cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD mdk-stage1 kernel Makefile.config | bzip2 >mdk-stage1/$(PRODUCT)-$(VERSION).tar.bz2; + .depend: $(CPP) $(CFLAGS) -M $(ALLSRC) > .depend -- cgit v1.2.1