--- gforth/Makefile.in 2008/12/10 15:29:35 1.438 +++ gforth/Makefile.in 2010/12/27 13:16:47 1.453 @@ -1,6 +1,6 @@ #Makefile for Gforth -#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc. +#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. #This file is part of Gforth. @@ -82,7 +82,7 @@ BUILDFORTH = $(ENGINE) --die-on-signal - # the forth system plus flags we use to build FORTHB = $(BUILDFORTH) exboot.fs -e 'fpath= .|~+|$(srcdir)' # the Forth system for running prims2x.fs -FORTHP = $(FORTH) +#FORTHP = $(FORTH) ENGINE_FAST = ./gforth-fast FORTH_FAST = $(ENGINE_FAST) $(FORTH_ARGS) FORTHKFLAGS= --die-on-signal -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" -i $(kernel_fi) @@ -129,7 +129,7 @@ datarootdir = @datarootdir@ datadir = @datadir@ #read-only architecture-dependent non-ascii files libdir = @libdir@ -libccdir = $(libdir)/gforth/$(VERSION)/libcc-named/ +libccdir = $(subst $(DESTDIR),,$(libdir)/gforth/$(VERSION)/libcc-named/) includedir = @includedir@ infodir = @infodir@ htmldir = @htmldir@ @@ -143,14 +143,14 @@ siteforthdir=$(datadir)/gforth/site-fort PROFOBJS = @PROFOBJS@ PROFEXES = @PROFEXES@ -CVSDIRS = CVS engine/CVS kernel/CVS doc/CVS asm/CVS ec/CVS test/CVS \ - compat/CVS unix/CVS \ - arch/CVS arch/generic/CVS arch/m68k/CVS arch/mips/CVS \ - arch/386/CVS arch/hppa/CVS arch/sparc/CVS arch/power/CVS \ - arch/alpha/CVS arch/4stack/CVS arch/misc/CVS arch/6502/CVS \ - arch/8086/CVS arch/avr/CVS arch/c165/CVS arch/h8/CVS \ - arch/shboom/CVS arch/sharc/CVS arch/ia64/CVS arch/amd64/CVS \ - arch/arm/CVS arch/r8c/CVS +INSTALLDIRS = kernel doc asm ec test \ + compat unix \ + arch arch/generic arch/m68k arch/mips \ + arch/386 arch/hppa arch/sparc arch/power \ + arch/alpha arch/4stack arch/misc arch/6502 \ + arch/8086 arch/avr arch/c165 arch/h8 \ + arch/shboom arch/sharc arch/ia64 arch/amd64 \ + arch/arm arch/r8c INCLUDES = engine/forth.h engine/threaded.h engine/io.h engine/longlong.h @@ -207,7 +207,7 @@ EC_SRC = \ ec/nesting.fs \ build-ec.in -GFORTH_FI_SRC = \ +GFORTH_FI_SRC1=\ assert.fs \ backtrac.fs \ blocked.fb \ @@ -218,7 +218,8 @@ GFORTH_FI_SRC = \ debugs.fs \ dis-gdb.fs \ ekey.fs \ - envos.fs \ + +GFORTH_FI_SRC2=\ savesys.fs \ environ.fs \ errors.fs \ @@ -235,6 +236,7 @@ GFORTH_FI_SRC = \ locals.fs \ look.fs \ mkdir.fs \ + prelude.fs \ quotes.fs \ search.fs \ see.fs \ @@ -254,17 +256,30 @@ GFORTH_FI_SRC = \ arch/386/asm.fs arch/386/disasm.fs \ arch/amd64/asm.fs arch/amd64/disasm.fs \ arch/alpha/asm.fs arch/alpha/disasm.fs arch/alpha/testasm.fs\ + arch/arm/asm.fs arch/arm/disasm.fs \ + arch/arm/testdisasm.fs arch/arm/testdisasm.out arch/arm/Makefile \ arch/mips/asm.fs arch/mips/disasm.fs arch/mips/insts.fs \ arch/mips/testasm.fs arch/mips/testdisasm.fs \ arch/power/asm.fs arch/power/disasm.fs arch/power/inst.fs +# execlude envos.fs into list of distributed sources +GFORTH_FI_DIST_SRC = \ + $(GFORTH_FI_SRC1) \ + $(GFORTH_FI_SRC2) + +GFORTH_FI_SRC = \ + $(GFORTH_FI_SRC1) \ + envos.fs \ + $(GFORTH_FI_SRC2) + LIBCC_SRC = cstr.fs unix/socket.fs LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) LIBCC_BUILD_SRC = @LIBCC_BUILD_SRC@ $(LIBCC_SRC) -FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) $(EC_SRC) $(LIBCC_DIST_SRC) \ + +FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_DIST_SRC) $(EC_SRC) $(LIBCC_DIST_SRC) \ ans-report.fs ansi.fs answords.fs \ colorize.fs comp-i.fs complex.fs \ depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ @@ -281,6 +296,7 @@ FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) test/other.fs test/signals.fs test/checkans.fs \ test/primtest.fs test/coreext.fs test/deferred.fs \ test/coremore.fs test/gforth-nofast.fs test/libcc.fs \ + test/macros.fs \ bubble.fs siev.fs matrix.fs fib.fs \ oof.fs oofsampl.fs objects.fs objexamp.fs mini-oof.fs moof-exm.fs \ moofglos.fs fixpath.fs \ @@ -295,6 +311,7 @@ COMPAT = compat/README \ compat/exception.fs \ compat/execute-parsing.fs \ compat/loops.fs \ + compat/macros.fs \ compat/required.fs \ compat/strcomp.fs \ compat/struct.fs \ @@ -310,6 +327,7 @@ ARCHS = \ arch/generic/machine.h \ arch/m68k/machine.h \ arch/mips/machine.h \ + arch/mips/check_prim.c \ arch/386/machine.h \ arch/hppa/machine.h \ arch/hppa/cache.c \ @@ -356,7 +374,13 @@ ARCHS = \ arch/r8c/asm.fs \ arch/r8c/mach.fs \ arch/r8c/errors.fs \ - arch/r8c/prim.fs + arch/r8c/prim.fs \ + arch/r8c/asm-test.fs \ + arch/r8c/errors.fs \ + arch/r8c/lauflicht.fs \ + arch/r8c/tasker.fs \ + arch/r8c/terminal.fs \ + arch/sharc/unistd.h #not included in distribution until distribution terms are included: ARCHS_NO_DIST = \ @@ -373,15 +397,9 @@ ARCHS_NO_DIST = \ arch/c165/mach.fs \ arch/c165/prim.fs \ arch/h8/asm.fs \ - arch/r8c/asm-test.fs \ - arch/r8c/errors.fs \ - arch/r8c/lauflicht.fs \ - arch/r8c/tasker.fs \ - arch/r8c/terminal.fs \ - arch/r8c/tt.fs \ - arch/sharc/unistd.h + arch/r8c/tt.fs -VMGEN_EX = vmgen-ex/CVS vmgen-ex/Makefile vmgen-ex/README vmgen-ex/disasm.c \ +VMGEN_EX = vmgen-ex/Makefile vmgen-ex/README vmgen-ex/disasm.c \ vmgen-ex/engine.c vmgen-ex/fib.mini \ vmgen-ex/mini-inst.vmg vmgen-ex/mini-super.vmg vmgen-ex/mini.h \ vmgen-ex/mini.l vmgen-ex/mini.y vmgen-ex/peephole-blacklist \ @@ -404,7 +422,7 @@ ENGINE_SOURCES = engine/Makefile.in engi engine/fnmatch.h engine/fnmatch.c \ engine/makefile.dos engine/makefile.os2 -SOURCES = $(CVSDIRS) $(ENGINE_SOURCES) compat Makefile.in Makedist.in \ +SOURCES = $(ENGINE_SOURCES) compat Makefile.in Makedist.in \ gforthmi.in vmgen.in preforth.in gfgen README.vmgen NEWS.vmgen \ autogen.sh configure.in configure config.sub config.guess \ elisp-comp missing stamp-h.in envos.fs.in \ @@ -427,9 +445,9 @@ SOURCES = $(CVSDIRS) $(ENGINE_SOURCES) c RCS_FILES = ToDo model high-level -ENGINES = gforth$(EC)$(EXE) gforth-ditc$(EC)$(EXE) gforth-itc$(EC)$(EXE) $(PROFEXES) +ENGINES = gforth$(EC)$(EXE) @NO_EC@ gforth-ditc$(EC)$(EXE) gforth-itc$(EC)$(EXE) $(PROFEXES) -ENGINES_FAST = gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE) +ENGINES_FAST = @NO_EC@ gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE) GEN = $(ENGINES) $(ENGINES_FAST) gforth.elc @@ -445,7 +463,7 @@ FORTH_GEN_ENGINE_FAST= \ engine/costs-fast.i engine/super2-fast.i FORTH_GEN_PRIMB = $(FORTH_GEN_ENGINE) kernel/aliases.fs kernel/prim.fs FORTH_GEN0 = prim.b $(FORTH_GEN_PRIMB) -FORTH_GEN = $(FORTH_GEN0) @KERNEL@ gforth.fi +FORTH_GEN = $(FORTH_GEN0) @KERNEL@ @NO_EC@ gforth.fi # this is used for antidependences, FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@ build-ec @@ -474,7 +492,7 @@ GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) \ .SUFFIXES: .SUFFIXES: .c .o -all: kernel/version.fs more check +all: kernel/version.fs more @NO_EC@ check # use this dependency for phony targets just as mostlyclean,... FORCE: ; @@ -613,7 +631,7 @@ install: gforth$(EC)$(EXE) $(FORTH_SRC) (cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) -$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) -for i in $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done - for i in $(FORTH_SRC) $(COMPAT) prim; do \ + for i in $(FORTH_SRC) $(COMPAT) envos.fs prim; do \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ done $(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(datadir)/gforth/$(VERSION) @@ -643,10 +661,10 @@ installdirs: mkinstalldirs for i in $(bindir) $(man1dir) $(infodir) $(libdir)/gforth/$(VERSION) $(datadir)/gforth/$(VERSION) $(libdir)/gforth/site-forth $(siteforthdir) $(includedir)/gforth/$(VERSION) $(libccdir); do \ $(srcdir)/mkinstalldirs $(DESTDIR)$$i; \ done - for i in $(CVSDIRS); do \ - $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/gforth/$(VERSION)/`dirname $$i`; \ + # + for i in $(INSTALLDIRS); do \ + $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ done - $(RM) -rf $(DESTDIR)$(datadir)/gforth/$(VERSION)/engine #deinstall all files specific to this version of gforth #to uninstall version foo, type `make uninstall VERSION=foo' @@ -657,7 +675,7 @@ uninstall: FORCE build-libcc-named: $(LIBCC_BUILD_SRC) $(FORTH_GEN) $(GEN) FORCE $(RMTREE) lib/gforth/$(VERSION)/libcc-named/ - for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(libccdir)\" ; is replace-rpath" $(srcdir)/$$i -e bye; done + for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(DESTDIR)$(libccdir)\" ; is replace-rpath" $(srcdir)/$$i -e bye; done check: gforths gforth.fi $(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 @@ -673,7 +691,7 @@ checkone test: gforth.fi engine/prim-s.i $(FORTH) test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs test/string.fs test/float.fs test/deferred.fs test/coreext.fs test/search.fs -e bye 2>&1 | tr -d '\015' | diff -c - $(srcdir)/test/coretest.out $(FORTH) test/other.fs -e bye $(FORTHS) test/signals.fs -e bye - $(FORTHS) test/coremore.fs test/gforth.fs -e bye 2>&1 | tr -d '\015' | diff -c - $(srcdir)/test/gforth.out + $(FORTHS) test/coremore.fs test/gforth.fs test/macros.fs -e bye 2>&1 | tr -d '\015' | diff -c - $(srcdir)/test/gforth.out $(FORTH) code.fs test/checkans.fs -e bye | tr -d '\015' | diff -c - $(srcdir)/test/checkans.out $(FORTH) prims2x.fs -e \ "c-flag on s\" prim.i\" out-filename 2! s\" $(srcdir)/prim.b\" ' output-c ' output-c-combined process-file bye"| \ @@ -823,7 +841,7 @@ gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCE $(CP) engine/$@ $@ && \ $(MASSAGE_EXE) $@; \ @GFORTH_EXE@; \ - $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ + @NO_EC@ $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ fi optgforth: @@ -837,7 +855,7 @@ gforth-fast$(OPT)$(EC)$(EXE): $(ENGINE_S $(CP) engine/$@ $@ && \ $(MASSAGE_EXE) $@; \ @GFORTHFAST_EXE@; \ - $(MAKE) checkone ENGINE=./engine/$@; \ + @NO_EC@ $(MAKE) checkone ENGINE=./engine/$@; \ fi optgforth-fast: @@ -1012,14 +1030,18 @@ config.status: configure ./config.status --recheck #create files for DOS, because DOS cannot do it itself -makefile.dos engine/makefile.dos: mkdosmf.sed Makefile.in engine/Makefile.in +makefile.dos: mkdosmf.sed Makefile.in sed -f mkdosmf.sed makefile.dos + +engine/makefile.dos: mkdosmf.sed engine/Makefile.in sed -f mkdosmf.sed engine/makefile.dos -makefile.os2 engine/makefile.os2: mkos2mf.sed Makefile.in engine/Makefile.in +makefile.os2: mkos2mf.sed Makefile.in sed -f mkos2mf.sed makefile.os2 + echo '%.o: %.c' >>makefile.os2 + echo ' $$(GCC) $$(CFLAGS) $$(CPPFLAGS) -c $$<' >>makefile.os2 + +engine/makefile.os2: mkos2mf.sed engine/Makefile.in sed -f mkos2mf.sed engine/makefile.os2 - echo '%.o: %.c' >>makefile.os2 - echo ' $$(GCC) $$(CFLAGS) $$(CPPFLAGS) -c $$<' >>makefile.os2 - echo '%.o: %.c' >>engine/makefile.os2 - echo ' $$(GCC) $$(CFLAGS) $$(CPPFLAGS) -c $$<' >>engine/makefile.os2 + echo '%.o: %.c' >>engine/makefile.os2 + echo ' $$(GCC) $$(CFLAGS) $$(CPPFLAGS) -c $$<' >>engine/makefile.os2