Commit 706d0203 authored by Anton Ertl's avatar Anton Ertl
Browse files

replced tester.fs and coretest.fs with the new versions from John Hayes

make mostlyclean virtualclean added
Cache-flushing now works on the Alpha (other minor changes there)
configure now uses gcc by default and passes its GCC variable to the Makefile
introduced sourcefilename and sourceline# (and used them in many places).
parent 8ebed000
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ siev bubble matrix fib machine and configuration
31.90	35.60	28.30	36.70	i486 66MHz 256K cache; gcc-2.6.3 -DFORCE_REG; gforth-0.1alpha
39.50	45.91	36.73	44.90	i486 50MHz 256K cache; gcc-2.7.0 -DFORCE_REG -DDIRECT_THREADED; gforth-0.1beta
42.82	46.74	38.69	48.30	i486 50MHz 256K cache; gcc-2.7.0 -DFORCE_REG; gforth-0.1beta
 9.0	 9.6	 7.7	 9.6	21064A (Alpha) 289MHz 2M cache; gcc-2.7.0; gforth-0.1beta
 8.4	 8.3	 7.2	 9.4	21064A (Alpha) 300MHz 2M cache; gcc-2.7.1; gforth-0.1beta
17.3	19.0	14.1	18.3	R4000 100MHz 1M cache; gcc-2.4.5; gforth-0.1beta
50.9	56.8	42.4	52.0	R3000 25MHz 64K+64K cache; gcc-2.5.8 -DFORCE_REG; gforth-0.1beta
63.0	73.3	74.6	65.7	FJMB86903 (SPARC ELC) 33MHz; gcc-2.5.8; gforth-0.1beta
30.0	34.1	20.5	33.0	PA-RISC 1.1 50MHz 64K cache; gcc-2.6.3 -DDIRECT_THREADED; gforth-0.1beta
+6 −17
Original line number Diff line number Diff line
@@ -4,14 +4,6 @@ First, type

./configure

or better

CC=gcc ./configure

or however your gcc is called; because configure needs cc to find out some
parameters, and there may be differences in what is obtained from gcc and
from ghe default cc.

configure has the following useful parameters:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [default: /usr/local]
@@ -36,21 +28,18 @@ configure has the following useful parameters:
If you don't like the defaults for the installation directories, you
should override them already during configure.  E.g., if you want to
install in the /gnu hierarchy instead of in the default /usr/local
hirarchy, say
hierarchy, say

./configure --prefix=/gnu

After, configuration, type
Moreover, if your GCC is not called gcc (but, e.g., gcc-2.7.1), you
should say so during configuration:

make
env GCC=gcc-2.7.1 ./configure

If your make has trouble with the Makefile, "make gforth" might work.

If your installed gcc isn't called "gcc" (e.g., called "gcc-2.6.1"), type

make GCC=<whatever you call your gcc>
After, configuration, type

instead.
make

Now you can check whether your shiny new Forth system works. Say

+18 −6
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
LN_S	= @LN_S@
GCC	= gcc
GCC	= @GCC@
CC	= $(GCC)
FORTH	= ./gforth
FORTHK	= $(FORTH) -i kernal.fi
@@ -100,7 +100,7 @@ SOURCES = Makefile.in configure.in configure config.sub config.guess \

RCS_FILES =  ToDo model high-level

GEN = gforth
GEN = gforth first

OBJECTS	= engine.o io.o main.o @LIBOBJS@ @getopt_long@

@@ -142,8 +142,14 @@ more: $(FORTH_GEN) gforth
# `distclean' also deletes the files made by config.
# `realclean' also deletes everything that could be regenerated automatically."

clean:		
		-$(RM) $(GEN) *.o *.s gforth.fi *.fi~ *.fi+ version.fs TAGS crossdoc.fd
mostlyclean:
		-$(RM) -rf *.s gforth.fi *.fi~ *.fi+ version.fs TAGS \
		crossdoc.fd doc.fd gforth.aux gforth.cp gforth.cps \
		gforth.dvi gforth.fn gforth.ky gforth.log gforth.pg \
		gforth.toc gforth.tp gforth.vr html 

clean:		mostlyclean
		-$(RM) -rf $(GEN) *.o 

distclean:	clean
		-$(RM) machine.h kernal.fi config.cache config.log config.status Makefile
@@ -151,6 +157,11 @@ distclean: clean
realclean:	distclean
		-$(RM) $(GEN_PRECIOUS)

#mostlyclean, but also remove some of the stuff that is distributed
virtualclean:	mostlyclean
		-$(RM) -rf gforth.fns gforth.texi gforth.ps gforth.info* \
		gforth-$(VERSION).tar.gz config.cache *~

dist:		$(SOURCES) $(FORTH_GEN) $(DOCDIST)
		-rm -rf gforth-$(VERSION)
		mkdir gforth-$(VERSION)
@@ -190,6 +201,7 @@ binonlydist: $(SOURCES) $(FORTH_GEN) gforth $(OBJECTS)
install:	gforth $(FORTH_SRC) kernal.fi gforth.fi gforth.1 gforth.info
		$(INSTALL) -d $(bindir) $(mandir) $(infodir) $(libdir)/gforth/$(VERSION) $(datadir)/gforth/$(VERSION) $(libdir)/gforth/site-forth $(datadir)/gforth/site-forth
		touch $(datadir)/gforth/site-forth/site-init.fs
		-$(RM) $(bindir)/gforth
		$(INSTALL_PROGRAM) -s gforth $(bindir)
		ln -f $(bindir)/gforth $(bindir)/gforth-$(VERSION)
		$(INSTALL_DATA) gforth.1 $(mandir)
@@ -197,7 +209,7 @@ install: gforth $(FORTH_SRC) kernal.fi gforth.fi gforth.1 gforth.info
		for i in $(FORTH_SRC); do \
			$(INSTALL_DATA) $$i $(datadir)/gforth/$(VERSION); \
		done
		rm gforth.fi; make gforth.fi #gforth.fi contains some path names
		$(RM) gforth.fi; make gforth.fi #gforth.fi contains some path names
		$(INSTALL_DATA) kernal.fi gforth.fi $(libdir)/gforth/$(VERSION)


@@ -329,7 +341,7 @@ gforth.texi: gforth.ds primitives.b ds2texi.fs prims2x.fs doc.fd crossdoc.fd
checkdoc:	gforth.ds primitives.b ds2texi.fs prims2x.fs doc.fd crossdoc.fd answords.fs
		$(FORTHK) -p . ds2texi.fs answords.fs -e bye

gforth.dvi:	gforth.texi
gforth.dvi gforth.fns:	gforth.texi
		$(TEXI2DVI) gforth.texi

gforth.ps:	gforth.dvi
+8 −0
Original line number Diff line number Diff line
@@ -20,9 +20,17 @@
*/

/* Be careful: long long on Alpha are 64 bit :-(( */
#define LONG_LATENCY

#if !defined(USE_TOS) && !defined(USE_NO_TOS)
#define USE_TOS
#endif

#ifdef DIRECT_THREADED
#warning direct threading not supported on the Alpha (yet)
#undefine DIRECT_THREADED
#endif

#define FLUSH_ICACHE(addr,size)		asm("call_pal 0x86") /* imb */

#include "32bit.h"
+9 −0
Original line number Diff line number Diff line
dnl Process this file with autoconf to produce a configure script.

AC_INIT(engine.c)

GCC=${GCC-gcc}
AC_SUBST(GCC)

dnl configure needs $CC to find out some parameters, and there may be
dnl differences in what is obtained from gcc and from the default cc.
dnl Therefore, we define $CC to be gcc:
CC=$GCC

AC_ARG_ENABLE(force-reg,
[  --enable-force-reg	  Use explicit register declarations if they appear in
			  the machine.h file. This can cause a good speedup,
Loading