--- gforth/Makefile.in 2001/01/23 10:05:36 1.196 +++ gforth/Makefile.in 2001/04/08 13:48:11 1.204 @@ -69,7 +69,7 @@ ENGINE = ./gforth FORTH = $(ENGINE) $(FORTH_ARGS) ENGINE_FAST = $(ENGINE)-fast FORTH_FAST = $(ENGINE_FAST) $(FORTH_ARGS) -FORTHKFLAGS= --die-on-signal -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" -i $(kernel_fi) +FORTHKFLAGS= --die-on-signal -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" -m 1000000 -i $(kernel_fi) FORTHK = $(ENGINE) $(FORTHKFLAGS) FORTHP = $(ENGINE) --die-on-signal -i ./$(kernel_fi) #the "-2 image-included-files +!" undoes the change to image-included-files @@ -127,7 +127,7 @@ INCLUDES = engine/forth.h engine/threade KERN_SRC = \ mach16b.fs mach16l.fs mach32b.fs mach32l.fs mach64b.fs mach64l.fs \ - machpc.fs \ + machpc.fs.in \ kernel/aliases0.fs \ kernel/aliases.fs \ kernel/args.fs \ @@ -226,7 +226,7 @@ FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) tt.fs sokoban.fs \ unbuffer.fs wordsets.fs \ test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs \ - test/other.fs test/checkans.fs \ + test/string.fs test/other.fs test/checkans.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 \ @@ -330,10 +330,10 @@ SOURCES = $(CVSDIRS) compat Makefile.in RCS_FILES = ToDo model high-level -GEN = gforth$(EXE) gforth-ditc$(EXE) gforth-fast$(EXE) kernel/version.fs +GEN = gforth$(EXE) gforth-ditc$(EXE) gforth-fast$(EXE) gforth-prof$(EXE) kernel/version.fs # things that need a working forth system to be generated -FORTH_GEN0 = prim.b engine/prim.i engine/prim_lab.i kernel/aliases.fs kernel/prim.fs +FORTH_GEN0 = prim.b engine/prim.i engine/prim_lab.i engine/peephole.i engine/profile.i kernel/aliases.fs kernel/prim.fs FORTH_GEN = $(FORTH_GEN0) @KERNEL@ gforth.fi # this is used for antidependences, FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@ @@ -403,7 +403,7 @@ docclean: FORCE clean: mostlyclean -$(RM) -rf $(GEN) engine/gforth$(EXE) \ - engine/gforth-fast$(EXE) engine/gforth-ditc$(EXE) \ + engine/gforth-fast$(EXE) engine/gforth-ditc$(EXE) engine/gforth-prof$(EXE) \ *.o engine/*.o arch/*/*.o version distclean: clean @@ -505,7 +505,7 @@ uninstall: FORCE @echo -e "To remove Gforth completely, type\n$(RM) -rf $(bindir)/gforth$(EXE) $(bindir)/gforth-fast$(EXE) $(bindir)/gforthmi $(man1dir)/gforth.1 $(infodir)/gforth.info* $(datadir)/gforth $(libdir)/gforth" check test: gforth$(EXE) gforth.fi - $(FORTH) test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs -e bye | diff -c - $(srcdir)/test/coretest.out + $(FORTH) test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs test/string.fs -e bye | diff -c - $(srcdir)/test/coretest.out $(FORTH) test/other.fs -e bye $(FORTH) code.fs test/checkans.fs -e bye | diff -c - $(srcdir)/test/checkans.out $(FORTH) -m 100000 prims2x.fs -e \ @@ -516,7 +516,7 @@ bench: gforth-fast$(EXE) gforth.fi @echo 'Each benchmark takes about 30s on a 486-66 (gcc-2.6.3 -DFORCE_REG)' time $(FORTH_FAST) siev.fs -e "main bye" time $(FORTH_FAST) bubble.fs -e "main bye" - time $(FORTH_FAST) -m 160000 matrix.fs -e "main bye" + time $(FORTH_FAST) -m 200000 matrix.fs -e "main bye" time $(FORTH_FAST) fib.fs -e "main bye" # ------------- Make forth images @@ -529,22 +529,22 @@ bench: gforth-fast$(EXE) gforth.fi # 3. copy new kernels to kernlXYZ.fi # these are the ones we want to use now -kernl16l.fi-: $(KERN_SRC) kernel/version.fs mach16l.fs $(FORTH_GEN0) +kernl16l.fi-: $(KERN_SRC) kernel/version.fs mach16l.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach16l.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl16l.fi- $(bindir)/gforth-$(VERSION) bye" -kernl16b.fi-: $(KERN_SRC) kernel/version.fs mach16b.fs $(FORTH_GEN0) +kernl16b.fi-: $(KERN_SRC) kernel/version.fs mach16b.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach16b.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl16b.fi- $(bindir)/gforth-$(VERSION) bye" -kernl32l.fi-: $(KERN_SRC) kernel/version.fs mach32l.fs $(FORTH_GEN0) +kernl32l.fi-: $(KERN_SRC) kernel/version.fs mach32l.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach32l.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl32l.fi- $(bindir)/gforth-$(VERSION) bye" -kernl32b.fi-: $(KERN_SRC) kernel/version.fs mach32b.fs $(FORTH_GEN0) +kernl32b.fi-: $(KERN_SRC) kernel/version.fs mach32b.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach32b.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl32b.fi- $(bindir)/gforth-$(VERSION) bye" -kernl64l.fi-: $(KERN_SRC) kernel/version.fs mach64l.fs $(FORTH_GEN0) +kernl64l.fi-: $(KERN_SRC) kernel/version.fs mach64l.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach64l.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl64l.fi- $(bindir)/gforth-$(VERSION) bye" -kernl64b.fi-: $(KERN_SRC) kernel/version.fs mach64b.fs $(FORTH_GEN0) +kernl64b.fi-: $(KERN_SRC) kernel/version.fs mach64b.fs machpc.fs $(FORTH_GEN0) $(FORTHK) -e 's" mach64b.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl64b.fi- $(bindir)/gforth-$(VERSION) bye" kernl-%.fi: arch/%/mach.fs $(KERN_SRC) kernel/version.fs $(FORTH_GEN0) @@ -603,6 +603,16 @@ engine/prim_lab.i: prim.b prims2x.fs $(CP) $@- $@ $(RM) $@- +engine/peephole.i: prim.b prims2x.fs + $(FORTH) -m 1000000 prims2x.fs -e "c-flag on s\" prim.b\" ' noop ' output-peephole process-file bye" >$@- + $(CP) $@- $@ + $(RM) $@- + +engine/profile.i: prim.b prims2x.fs + $(FORTH) -m 1000000 prims2x.fs -e "c-flag on s\" prim.b\" ' output-profile ' output-profile process-file bye" >$@- + $(CP) $@- $@ + $(RM) $@- + kernel/aliases.fs: prim.b prims2x.fs kernel/aliases0.fs $(CP) kernel/aliases0.fs $@- $(FORTH) -m 1000000 prims2x.fs -e "forth-flag on s\" prim.b\" ' output-alias dup process-file bye" >>$@- @@ -615,6 +625,11 @@ kernel/prim.fs: prim.b prims2x.fs kernel $(CP) $@- $@ $(RM) $@- +kernel/peephole.fs: prim.b prims2x.fs + $(FORTH) -m 1000000 prims2x.fs -e "forth-flag on s\" prim.b\" ' noop ' output-forth-peephole process-file bye" >$@- + $(CP) $@- $@ + $(RM) $@- + gforth$(EXE): engines -$(CP) gforth$(EXE) gforth~ $(CP) engine/$@ $@ @@ -628,8 +643,11 @@ gforth-ditc$(EXE): engines $(CP) engine/$@ $@ @GFORTHDITC_EXE@ -engines: FORCE engine/Makefile engine/prim.i engine/prim_lab.i - cd engine && $(MAKE) gforth$(EXE) gforth-fast$(EXE) gforth-ditc$(EXE) +gforth-prof$(EXE): engines + $(CP) engine/$@ $@ + +engines: FORCE engine/Makefile engine/prim.i engine/prim_lab.i engine/peephole.i engine/profile.i + cd engine && $(MAKE) gforth$(EXE) gforth-fast$(EXE) gforth-ditc$(EXE) gforth-prof$(EXE) # ------------- additional C primitives @@ -654,9 +672,10 @@ gforth.TAGS: @kernel_fi@ gforth$(EXE) $( rm TAGS prim.TAGS: prim.b prims2x.fs - echo '2c\' >prim.TAGS.sed - echo $(srcdir)/prim >>prim.TAGS.sed - $(FORTH) -m 1000000 prims2x.fs -e "s\" $(srcdir)/prim.b\" ' output-tag dup process-file bye" | sed -f prim.TAGS.sed >$@- + #echo '2c\' >prim.TAGS.sed + #echo $(srcdir)/prim >>prim.TAGS.sed + #$(FORTH) -m 1000000 prims2x.fs -e "s\" $(srcdir)/prim.b\" ' output-tag dup process-file bye" | sed -f prim.TAGS.sed >$@- + $(FORTH) -m 1000000 prims2x.fs -e "s\" $(srcdir)/prim.b\" ' output-tag dup process-file bye" >$@- $(CP) $@- $@ $(RM) $@- @@ -726,7 +745,7 @@ stamp-h: engine/config.h.in config.statu CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status echo timestamp > stamp-h -Makefile Makedist engine/Makefile gforthmi: Makefile.in Makedist.in engine/Makefile.in gforthmi.in config.status +Makefile Makedist engine/Makefile gforthmi machpc.fs: Makefile.in Makedist.in engine/Makefile.in gforthmi.in machpc.fs.in config.status CONFIG_FILES="$@" CONFIG_HEADERS=engine/config.h ./config.status config.status: configure