--- gforth/Makefile.in 2010/09/13 22:27:28 1.452 +++ gforth/Makefile.in 2012/03/22 01:45:42 1.474 @@ -1,6 +1,6 @@ #Makefile for Gforth -#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. +#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc. #This file is part of Gforth. @@ -47,6 +47,31 @@ PATHSEP = @PATHSEP@ EC = @EC@ +# ------------ Install Directories + +package = +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +srcdir = @srcdir@ +bindir = $(package)@bindir@ +#read-only architecture-independent files +datarootdir = @datarootdir@ +datadir = $(package)@datadir@ +#read-only architecture-dependent non-ascii files +libdir = $(package)@libdir@ +libexecdir = $(package)@libexecdir@ +libccdir = $(subst $(DESTDIR),,$(libexecdir)/gforth/$(VERSION)/libcc-named/) +includedir = $(package)@includedir@ +infodir = $(package)@infodir@ +htmldir = $(package)@htmldir@ +mandir = $(package)@mandir@ +man1dir= $(mandir)/man1 +man1ext= .1 +#older emacses have their site-lisp in $(libdir)/emacs/ +emacssitelispdir=$(package)@lispdir@ +siteforthdir=$(datadir)/gforth/site-forth + # ------------- Utility programs SHELL = /bin/sh @@ -64,7 +89,7 @@ INSTALL_INFO = @INSTALL_INFO@ LN_S = @LN_S@ M4 = @M4@ GCC = @CC@ -EMACS = emacs +EMACS = @EMACS@ LIBTOOL = @GNU_LIBTOOL@ PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" CC = $(GCC) @@ -86,7 +111,7 @@ FORTHB = $(BUILDFORTH) exboot.fs -e 'fpa ENGINE_FAST = ./gforth-fast FORTH_FAST = $(ENGINE_FAST) $(FORTH_ARGS) FORTHKFLAGS= --die-on-signal -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" -i $(kernel_fi) -FORTHK = $(ENGINE) $(FORTHKFLAGS) +FORTHK = ./gforthker -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" #FORTHP = $(ENGINE) --die-on-signal -i ./$(kernel_fi) #the "-2 image-included-files +!" undoes the change to image-included-files # in exboot.fs @@ -117,29 +142,6 @@ LDLIBS = @LIBS@ STACK_CACHE_REGS = @STACK_CACHE_REGS@ STACK_CACHE_DEFAULT_FAST = @STACK_CACHE_DEFAULT_FAST@ -# ------------ Install Directories - -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -srcdir = @srcdir@ -bindir = @bindir@ -#read-only architecture-independent files -datarootdir = @datarootdir@ -datadir = @datadir@ -#read-only architecture-dependent non-ascii files -libdir = @libdir@ -libccdir = $(libdir)/gforth/$(VERSION)/libcc-named/ -includedir = @includedir@ -infodir = @infodir@ -htmldir = @htmldir@ -mandir = @mandir@ -man1dir= $(mandir)/man1 -man1ext= .1 -#older emacses have their site-lisp in $(libdir)/emacs/ -emacssitelispdir=@lispdir@ -siteforthdir=$(datadir)/gforth/site-forth - PROFOBJS = @PROFOBJS@ PROFEXES = @PROFEXES@ @@ -181,6 +183,7 @@ KERN_SRC = \ kernel/basics.fs \ kernel/int.fs \ kernel/comp.fs \ + kernel/recognizer.fs \ kernel/io.fs \ kernel/input.fs \ kernel/license.fs \ @@ -189,7 +192,8 @@ KERN_SRC = \ kernel/doers.fs \ kernel/getdoers.fs \ kernel/pass.fs \ - kernel/xchars.fs + kernel/xchars.fs \ + string.fs EC_SRC = \ asm/README \ @@ -244,6 +248,7 @@ GFORTH_FI_SRC2=\ simp-see.fs \ source.fs \ startup.fs \ + str-exec.fs \ struct.fs \ struct0x.fs \ stuff.fs \ @@ -260,7 +265,8 @@ GFORTH_FI_SRC2=\ 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 + arch/power/asm.fs arch/power/disasm.fs arch/power/inst.fs \ + arch/lm32/asm.fs arch/lm32/testasm.fs # execlude envos.fs into list of distributed sources GFORTH_FI_DIST_SRC = \ @@ -272,7 +278,7 @@ GFORTH_FI_SRC = \ envos.fs \ $(GFORTH_FI_SRC2) -LIBCC_SRC = cstr.fs unix/socket.fs +LIBCC_SRC = cstr.fs unix/socket.fs unix/pthread.fs LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) @@ -288,7 +294,7 @@ FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_DIST make-app.fs doc/makedoc.fs locate.fs more.fs onebench.fs \ other.fs prims2x.fs prims2x0.6.2.fs proxy.fs random.fs \ regexp.fs sokoban.fs string.fs table.fs tags.fs \ - tt.fs \ + tt.fs quotations.fs \ unbuffer.fs wordsets.fs xwords.fs \ test/tester.fs test/ttester.fs \ test/coretest.fs test/postpone.fs test/dbltest.fs \ @@ -380,7 +386,12 @@ ARCHS = \ arch/r8c/lauflicht.fs \ arch/r8c/tasker.fs \ arch/r8c/terminal.fs \ - arch/sharc/unistd.h + arch/sharc/unistd.h \ + arch/lm32/mach.fs \ + arch/lm32/mach.sh \ + arch/lm32/prim.fs \ + arch/lm32/Makefile \ + arch/lm32/testasm.disas-ok #not included in distribution until distribution terms are included: ARCHS_NO_DIST = \ @@ -423,7 +434,7 @@ ENGINE_SOURCES = engine/Makefile.in engi engine/makefile.dos engine/makefile.os2 SOURCES = $(ENGINE_SOURCES) compat Makefile.in Makedist.in \ - gforthmi.in vmgen.in preforth.in gfgen README.vmgen NEWS.vmgen \ + gforthmi.in vmgen.in preforth.in libforth.in gforthker.in gfgen README.vmgen NEWS.vmgen \ autogen.sh configure.in configure config.sub config.guess \ elisp-comp missing stamp-h.in envos.fs.in \ iss.sh install-sh INSTALL INSTALL.BINDIST NEWS README ToDo BUGS \ @@ -449,7 +460,7 @@ ENGINES = gforth$(EC)$(EXE) @NO_EC@ gfor ENGINES_FAST = @NO_EC@ gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE) -GEN = $(ENGINES) $(ENGINES_FAST) gforth.elc +GEN = $(ENGINES) $(ENGINES_FAST) @gforth_elc@ # things that need a working forth system to be generated FORTH_GEN_ENGINE=engine/prim.i engine/prim_lab.i engine/prim_names.i \ @@ -463,7 +474,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@ @NO_EC@ gforth.fi +FORTH_GEN = $(FORTH_GEN0) @KERNEL@ @NO_CROSS@ gforth.fi # this is used for antidependences, FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@ build-ec @@ -492,7 +503,7 @@ GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) \ .SUFFIXES: .SUFFIXES: .c .o -all: kernel/version.fs more @NO_EC@ check +all: kernel/version.fs more @NO_CROSS@ check # use this dependency for phony targets just as mostlyclean,... FORCE: ; @@ -597,6 +608,9 @@ bindist: Makedist FORCE binonlydist: Makedist FORCE $(MAKE) -f Makedist d$@ +debdist: Makedist FORCE + $(MAKE) -f Makedist d$@ + #HPUX make breaks the cycle differently when the dates are equal, so # touch some of the files if it acts up hpux-workaround: @@ -610,7 +624,7 @@ hpux-workaround: #hard to generate). #we rebuild gforth.fi, because it contains some path names. #we delete $build/gforth.fi and $build/install.TAGS after installation because of ownership. -install: gforth$(EC)$(EXE) $(FORTH_SRC) $(kernel_fi) gforth.fi gforthmi vmgen doc/gforth.1 prim install.TAGS installdirs +install: gforth$(EC)$(EXE) $(FORTH_SRC) $(kernel_fi) gforthmi vmgen doc/gforth.1 prim install.TAGS installdirs @NO_CROSS@ gforth.fi $(NORMAL_INSTALL) touch $(DESTDIR)$(siteforthdir)/siteinit.fs -$(RM) $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen @@ -624,9 +638,10 @@ install: gforth$(EC)$(EXE) $(FORTH_SRC) (cd $(DESTDIR)$(bindir) && $(LN_S) gforth-fast-$(VERSION)$(EC)$(EXE) gforth-fast$(EC)$(EXE)) $(INSTALL_PROGRAM) gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) (cd $(DESTDIR)$(bindir) && $(LN_S) gforth-itc-$(VERSION)$(EC)$(EXE) gforth-itc$(EC)$(EXE)) + $(INSTALL_PROGRAM) gforth-ditc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-ditc-$(VERSION)$(EC)$(EXE) + (cd $(DESTDIR)$(bindir) && $(LN_S) gforth-ditc-$(VERSION)$(EC)$(EXE) gforth-ditc$(EC)$(EXE)) $(INSTALL_SCRIPT) gforthmi $(DESTDIR)$(bindir)/gforthmi-$(VERSION) $(INSTALL_SCRIPT) vmgen $(DESTDIR)$(bindir)/vmgen-$(VERSION) - $(INSTALL_PROGRAM) gforth-ditc $(DESTDIR)$(libdir)/gforth/$(VERSION) (cd $(DESTDIR)$(bindir) && $(LN_S) gforthmi-$(VERSION) gforthmi) (cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) -$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) @@ -634,18 +649,19 @@ install: gforth$(EC)$(EXE) $(FORTH_SRC) 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) + $(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(libdir)/gforth/$(VERSION) @if test -d "$(DESTDIR)$(emacssitelispdir)"; then \ - $(INSTALL_DATA) gforth.el $(DESTDIR)$(emacssitelispdir); \ - $(INSTALL_DATA) gforth.elc $(DESTDIR)$(emacssitelispdir); \ + for i in gforth.el @gforth_elc@; do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(emacssitelispdir); \ + done; \ else \ echo '>>>>>Please install gforth.{el,elc} in your .../emacs/site-lisp directory'; \ fi -$(RM) gforth.fi - GFORTHD="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) -i $(kernel_fi)" GFORTH="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) - $(INSTALL_DATA) gforth.fi $(DESTDIR)$(libdir)/gforth/$(VERSION) + @NO_CROSS@GFORTHD="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) -i $(kernel_fi)" GFORTH="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) + @NO_CROSS@$(INSTALL_DATA) gforth.fi $(DESTDIR)$(libdir)/gforth/$(VERSION) $(INSTALL_DATA) install.TAGS $(DESTDIR)$(datadir)/gforth/$(VERSION)/TAGS - $(RM) gforth.fi install.TAGS + $(RM) install.TAGS @NO_CROSS@gforth.fi $(INSTALL_DATA) include/gforth/$(VERSION)/* $(DESTDIR)$(includedir)/gforth/$(VERSION) if test -n "$(LIBTOOL)"; then for i in $(LIBCC_BUILD_SRC); do \ $(LIBTOOL) --silent --mode=install $(INSTALL) lib/gforth/$(VERSION)/libcc-named/`basename $$i .fs`.la $(DESTDIR)$(libccdir)`basename $$i .fs`.la; \ @@ -675,7 +691,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 ./libforth -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 @@ -688,7 +704,7 @@ check: gforths gforth.fi ./gforth-fast --diag -e bye 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/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>/dev/null | 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 test/macros.fs -e bye 2>&1 | tr -d '\015' | diff -c - $(srcdir)/test/gforth.out @@ -841,7 +857,7 @@ gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCE $(CP) engine/$@ $@ && \ $(MASSAGE_EXE) $@; \ @GFORTH_EXE@; \ - @NO_EC@ $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ + @NO_CROSS@ $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ fi optgforth: @@ -855,7 +871,7 @@ gforth-fast$(OPT)$(EC)$(EXE): $(ENGINE_S $(CP) engine/$@ $@ && \ $(MASSAGE_EXE) $@; \ @GFORTHFAST_EXE@; \ - @NO_EC@ $(MAKE) checkone ENGINE=./engine/$@; \ + @NO_CROSS@ $(MAKE) checkone ENGINE=./engine/$@; \ fi optgforth-fast: @@ -902,7 +918,7 @@ tags: gforth.tags $(CP) gforth.tags $@ install.TAGS: TAGS install-tags.fs - sed 's;^\$(srcdir)/;;' TAGS|./gforth -e 's" '$(datadir)/gforth/$(VERSION)/'"' $(srcdir)/install-tags.fs -e bye >install.TAGS + sed 's;^\$(srcdir)/;;' TAGS|$(PREFORTH) -e 's" '$(datadir)/gforth/$(VERSION)/'"' $(srcdir)/install-tags.fs -e bye >install.TAGS gforth.TAGS: @kernel_fi@ gforth$(EC)$(EXE) $(GFORTH_FI_SRC) prim.TAGS kernel.TAGS $(FORTHK) etags.fs except.fs startup.fs -e bye @@ -1023,7 +1039,7 @@ engine/config.h: stamp-h stamp-h: engine/config.h.in config.status stamp-h.in ./config.status -Makefile Makedist engine/Makefile gforthmi vmgen preforth machpc.fs doc/version.texi envos.fs build-ec: Makefile.in Makedist.in engine/Makefile.in gforthmi.in vmgen.in preforth.in machpc.fs.in doc/version.texi.in config.status configure.in envos.fs.in build-ec.in engine/libcc.h.in +Makefile Makedist engine/Makefile gforthmi vmgen preforth machpc.fs doc/version.texi envos.fs build-ec: Makefile.in Makedist.in engine/Makefile.in gforthmi.in vmgen.in preforth.in libforth.in machpc.fs.in doc/version.texi.in config.status configure.in envos.fs.in build-ec.in engine/libcc.h.in ./config.status config.status: configure