File:  [gforth] / gforth / Makedist.in
Revision 1.2: download - view: text, annotated - select for diffs
Tue Dec 22 21:17:13 1998 UTC (25 years, 3 months ago) by anton
Branches: MAIN
CVS tags: HEAD
new solution for make dist
fixed a bug in generating magic

    1: #make dist targets (workaround for broken makes)
    2: #use GNU make if your make does not grok this.
    3: 
    4: #Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
    5: 
    6: #This file is part of Gforth.
    7: 
    8: #Gforth is free software; you can redistribute it and/or
    9: #modify it under the terms of the GNU General Public License
   10: #as published by the Free Software Foundation; either version 2
   11: #of the License, or (at your option) any later version.
   12: 
   13: #This program is distributed in the hope that it will be useful,
   14: #but WITHOUT ANY WARRANTY; without even the implied warranty of
   15: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
   16: #GNU General Public License for more details.
   17: 
   18: #You should have received a copy of the GNU General Public License
   19: #along with this program; if not, write to the Free Software
   20: #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   21: 
   22: include Makefile
   23: 
   24: #use dist targets only when srcdir=.
   25: ddist:		$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
   26: 		-$(RMTREE) gforth-$(VERSION)
   27: 		mkdir gforth-$(VERSION)
   28: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
   29: 			(cd gforth-$(VERSION); tar xf -)
   30: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).tar.gz
   31: 		-$(RMTREE) gforth-$(VERSION)
   32: 
   33: #use dist targets only when srcdir=.
   34: ddosdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
   35: 		-$(RMTREE) gforth.$(DOSVERSION)
   36: 		mkdir gforth.$(DOSVERSION)
   37: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
   38: 			(cd gforth.$(DOSVERSION); tar xf -)
   39: 		$(MV) gforth.$(DOSVERSION)/engine/strsignal.c gforth.$(DOSVERSION)/engine/strsig.c
   40: 		for i in 1 2 3 4 5 6 7 8; do \
   41: 			$(MV) gforth.$(DOSVERSION)/doc/gforth.info-$$i gforth.$(DOSVERSION)/doc/gforth.i$$i; \
   42: 		done
   43: 		zip -r9 gf$(DOSVERSION)dos.zip gforth.$(DOSVERSION)/*
   44: 		-$(RMTREE) gforth.$(DOSVERSION)
   45: 
   46: #A source distribution contains only the things needed to install gforth,
   47: #without the documents.
   48: dsrcdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@
   49: 		-$(RMTREE) gforth-$(VERSION)
   50: 		mkdir gforth-$(VERSION)
   51: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ | \
   52: 			(cd gforth-$(VERSION); tar xf -)
   53: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-src-$(VERSION).tar.gz
   54: 		-$(RMTREE) gforth-$(VERSION)
   55: 
   56: dsrconlydist:	$(SOURCES)
   57: 		-$(RMTREE) gforth-$(VERSION)
   58: 		mkdir gforth-$(VERSION)
   59: 		$(TAR) $(SOURCES) | \
   60: 			(cd gforth-$(VERSION); tar xf -)
   61: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-srconly-$(VERSION).tar.gz
   62: 		-$(RMTREE) gforth-$(VERSION)
   63: 
   64: #A document distribution contains only the documents, which can be created
   65: #with MAKE.
   66: ddocdist:	$(DOCDIST)
   67: 		-$(RMTREE) gforth-$(VERSION)
   68: 		mkdir gforth-$(VERSION)
   69: 		$(TAR) $(DOCDIST) | (cd gforth-$(VERSION); tar xf -)
   70: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-doc-$(VERSION).tar.gz
   71: 		-$(RMTREE) gforth-$(VERSION)
   72: 
   73: dhtmldist:	html
   74: 		$(TAR) html|gzip -9 >gforth-html-$(VERSION).tar.gz
   75: 
   76: #a binary distribution contains the complete source distribution,
   77: # the objects, the executable and the links. the objects are there for making
   78: # make happy.
   79: dbindist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
   80: 		-$(RMTREE) gforth-$(VERSION)
   81: 		mkdir gforth-$(VERSION)
   82: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
   83: 		strip gforth-$(VERSION)/gforth
   84: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-@host@.tar.gz
   85: 
   86: #makes a package with only the stuff not present in the source
   87: #package. For installation the source package is still needed!
   88: #This is useful if you want to distribute many binary versions in
   89: #little space (e.g., on floppy disk): Put the source package and
   90: #all the binonly packages you are interested in on the disk. The user
   91: #then just has to unpack the source and his favourite binonly into the
   92: #same directory and has a full binary distribution.
   93: dbinonlydist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
   94: 		-$(RMTREE) gforth-$(VERSION)
   95: 		mkdir gforth-$(VERSION)
   96: 		$(TAR) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
   97: 		strip gforth-$(VERSION)/gforth
   98: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-binonly-@host@.tar.gz

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>