File:  [gforth] / gforth / Makedist.in
Revision 1.34: download - view: text, annotated - select for diffs
Sat Dec 31 15:29:25 2011 UTC (7 years, 11 months ago) by anton
Branches: MAIN
CVS tags: HEAD
updated copyright years

    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,2000,2003,2006,2007,2008,2010,2011 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 3
   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, see http://www.gnu.org/licenses/.
   20: 
   21: include Makefile
   22: 
   23: #!! redundancy with engine/Makefile.in
   24: DOBJECTS=engine/*.o
   25: 
   26: #stuff in a binonly distribution 
   27: BINONLYDIST = config.status Makefile Makedist \
   28: 	$(ENGINES) $(ENGINES_FAST) \
   29: 	$(DOBJECTS) engine/config.h engine/Makefile \
   30: 	$(wildcard engine/gforth*$(EXE)) \
   31: 	stamp-h kernel/version.fs envos.fs build-ec INSTALL.BINDIST
   32: 
   33: #use dist targets only when srcdir=.
   34: ddist:		$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
   35: 		-$(RMTREE) gforth-$(VERSION)
   36: 		mkdir gforth-$(VERSION)
   37: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
   38: 			(cd gforth-$(VERSION); tar xf -)
   39: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).tar.gz
   40: 		-$(RMTREE) gforth-$(VERSION)
   41: 
   42: #use dist targets only when srcdir=.
   43: ddosdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
   44: 		-$(RMTREE) gforth.$(DOSVERSION)
   45: 		mkdir gforth.$(DOSVERSION)
   46: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
   47: 			(cd gforth.$(DOSVERSION); tar xf -)
   48: 		$(MV) gforth.$(DOSVERSION)/engine/strsignal.c gforth.$(DOSVERSION)/engine/strsig.c
   49: 		for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do \
   50: 			$(MV) gforth.$(DOSVERSION)/doc/gforth.info-$$i gforth.$(DOSVERSION)/doc/gforth.i$$i; \
   51: 		done
   52: 		zip -r9 gf$(DOSVERSION)dos.zip gforth.$(DOSVERSION)/*
   53: 		-$(RMTREE) gforth.$(DOSVERSION)
   54: 
   55: #A source distribution contains only the things needed to install gforth,
   56: #without the documents.
   57: dsrcdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@
   58: 		-$(RMTREE) gforth-$(VERSION)
   59: 		mkdir gforth-$(VERSION)
   60: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ | \
   61: 			(cd gforth-$(VERSION); tar xf -)
   62: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-src-$(VERSION).tar.gz
   63: 		-$(RMTREE) gforth-$(VERSION)
   64: 
   65: dsrconlydist:	$(SOURCES)
   66: 		-$(RMTREE) gforth-$(VERSION)
   67: 		mkdir gforth-$(VERSION)
   68: 		$(TAR) $(SOURCES) | \
   69: 			(cd gforth-$(VERSION); tar xf -)
   70: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-srconly-$(VERSION).tar.gz
   71: 		-$(RMTREE) gforth-$(VERSION)
   72: 
   73: #A document distribution contains only the documents, which can be created
   74: #with MAKE.
   75: ddocdist:	$(DOCDIST)
   76: 		-$(RMTREE) gforth-$(VERSION)
   77: 		mkdir gforth-$(VERSION)
   78: 		$(TAR) $(DOCDIST) | (cd gforth-$(VERSION); tar xf -)
   79: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-doc-$(VERSION).tar.gz
   80: 		-$(RMTREE) gforth-$(VERSION)
   81: 
   82: dhtmldist:	html
   83: 		$(TAR) html|gzip -9 >gforth-html-$(VERSION).tar.gz
   84: 
   85: #a binary distribution contains the complete source distribution,
   86: # the objects, the executable and the links. the objects are there for making
   87: # make happy.
   88: dbindist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
   89: 		-$(RMTREE) gforth-$(VERSION)
   90: 		mkdir gforth-$(VERSION)
   91: 		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
   92: 		-$(STRIP) gforth-$(VERSION){,/engine}/gforth*$(EXE)
   93: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).bin.@host@.tar.gz
   94: 
   95: #All file names in a binary distribution
   96: distfiles:
   97: 		@echo $(SOURCES) $(PRECISE) machpc.fs $(FORTH_GEN0) compat/strcomp.fs gforthmi @KERNEL@ $(DOCDIST) $(BINONLYDIST)
   98: 
   99: #makes a package with only the stuff not present in the source
  100: #package. For installation the source package is still needed!
  101: #This is useful if you want to distribute many binary versions in
  102: #little space (e.g., on floppy disk): Put the source package and
  103: #all the binonly packages you are interested in on the disk. The user
  104: #then just has to unpack the source and his favourite binonly into the
  105: #same directory and has a full binary distribution.
  106: dbinonlydist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
  107: 		-$(RMTREE) gforth-$(VERSION)
  108: 		mkdir gforth-$(VERSION)
  109: 		$(TAR) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
  110: 		$(STRIP) gforth-$(VERSION)/gforth$(EXE)
  111: 		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).binonly.@host@.tar.gz

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