File:  [gforth] / gforth / Makedist.in
Revision 1.6: download - view: text, annotated - select for diffs
Wed May 31 14:37:40 2000 UTC (23 years, 10 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Added directory reads:
open-dir, read-dir, close-dir, filename-match

#make dist targets (workaround for broken makes)
#use GNU make if your make does not grok this.

#Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.

#This file is part of Gforth.

#Gforth is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

include Makefile

#!! redundancy with engine/Makefile.in
DOBJECTS=$(addprefix engine/,io.o signals.o memcmpc.o @LIBOBJS@ engine.o main.o engine-fast.o main-fast.o engine-ditc.o main-ditc.o)

#stuff in a binonly distribution 
BINONLYDIST = config.status Makefile Makedist gforth$(EXE) gforth-ditc$(EXE) \
	$(DOBJECTS) engine/config.h engine/Makefile \
	engine/gforth$(EXE) engine/gforth-ditc$(EXE) \
	stamp-h kernel/version.fs \
	INSTALL.BINDIST

#use dist targets only when srcdir=.
ddist:		$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
			(cd gforth-$(VERSION); tar xf -)
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).tar.gz
		-$(RMTREE) gforth-$(VERSION)

#use dist targets only when srcdir=.
ddosdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
		-$(RMTREE) gforth.$(DOSVERSION)
		mkdir gforth.$(DOSVERSION)
		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
			(cd gforth.$(DOSVERSION); tar xf -)
		$(MV) gforth.$(DOSVERSION)/engine/strsignal.c gforth.$(DOSVERSION)/engine/strsig.c
		for i in 1 2 3 4 5 6 7 8; do \
			$(MV) gforth.$(DOSVERSION)/doc/gforth.info-$$i gforth.$(DOSVERSION)/doc/gforth.i$$i; \
		done
		zip -r9 gf$(DOSVERSION)dos.zip gforth.$(DOSVERSION)/*
		-$(RMTREE) gforth.$(DOSVERSION)

#A source distribution contains only the things needed to install gforth,
#without the documents.
dsrcdist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ | \
			(cd gforth-$(VERSION); tar xf -)
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-src-$(VERSION).tar.gz
		-$(RMTREE) gforth-$(VERSION)

dsrconlydist:	$(SOURCES)
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(SOURCES) | \
			(cd gforth-$(VERSION); tar xf -)
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-srconly-$(VERSION).tar.gz
		-$(RMTREE) gforth-$(VERSION)

#A document distribution contains only the documents, which can be created
#with MAKE.
ddocdist:	$(DOCDIST)
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(DOCDIST) | (cd gforth-$(VERSION); tar xf -)
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-doc-$(VERSION).tar.gz
		-$(RMTREE) gforth-$(VERSION)

dhtmldist:	html
		$(TAR) html|gzip -9 >gforth-html-$(VERSION).tar.gz

#a binary distribution contains the complete source distribution,
# the objects, the executable and the links. the objects are there for making
# make happy.
dbindist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
		strip gforth-$(VERSION)/gforth
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-@host@.tar.gz

#makes a package with only the stuff not present in the source
#package. For installation the source package is still needed!
#This is useful if you want to distribute many binary versions in
#little space (e.g., on floppy disk): Put the source package and
#all the binonly packages you are interested in on the disk. The user
#then just has to unpack the source and his favourite binonly into the
#same directory and has a full binary distribution.
dbinonlydist:	$(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
		-$(RMTREE) gforth-$(VERSION)
		mkdir gforth-$(VERSION)
		$(TAR) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
		strip gforth-$(VERSION)/gforth
		$(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-binonly-@host@.tar.gz

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