File:  [gforth] / gforth / Makedist.in
Revision 1.20: download - view: text, annotated - select for diffs
Wed Dec 31 13:44:14 2003 UTC (15 years, 8 months ago) by anton
Branches: MAIN
CVS tags: HEAD
fixed some Makefile bugs

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

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