Fixed build problems

parent d96b07a4
......@@ -968,19 +968,19 @@ extra-install: $(EXTRAS) gforth.fi
kernl32l$(EC).fi-: $(KERN_DEPS) mach32l.fs preforth
-$(CP) kernl32l$(EC).fi kernl32l$(EC).fi~
$(PREFORTH) -e 's" mach32l.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl32l$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
$(PREFORTH) -e 's" mach32l.fs" include $(srcdir)/kernel/main.fs' -e "save-cross kernl32l$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
kernl32b$(EC).fi-: $(KERN_DEPS) mach32b.fs preforth
-$(CP) kernl32b$(EC).fi kernl32b$(EC).fi~
$(PREFORTH) -e 's" mach32b.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl32b$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
$(PREFORTH) -e 's" mach32b.fs" include $(srcdir)/kernel/main.fs' -e "save-cross kernl32b$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
kernl64l$(EC).fi-: $(KERN_DEPS) mach64l.fs preforth
-$(CP) kernl64l$(EC).fi kernl64l$(EC).fi~
$(PREFORTH) -e 's" mach64l.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl64l$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
$(PREFORTH) -e 's" mach64l.fs" include $(srcdir)/kernel/main.fs' -e "save-cross kernl64l$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
kernl64b$(EC).fi-: $(KERN_DEPS) mach64b.fs preforth
-$(CP) kernl64b$(EC).fi kernl64b$(EC).fi~
$(PREFORTH) -e 's" mach64b.fs"' $(srcdir)/kernel/main.fs -e "save-cross kernl64b$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
$(PREFORTH) -e 's" mach64b.fs" include $(srcdir)/kernel/main.fs' -e "save-cross kernl64b$(EC).fi- $(bindir)/gforth-$(VERSION) bye"
# Atomic copy, as kernel might be loaded concurrently
kernl%$(EC).fi: kernl%$(EC).fi-
......@@ -990,7 +990,7 @@ kernl%$(EC).fi: kernl%$(EC).fi-
#Solaris make does not like that:
@GNUMAKE@kernl-%.fi: arch/%/mach.fs arch/%/prim.fs arch/%/asm.fs $(KERN_SRC) kernel/version.fs $(FORTH_GEN0) preforth @kernel_fi@
@GNUMAKE@ $(PREFORTH) -e 's" $<"' $(srcdir)/kernel/main.fs -e "save-cross $@- $(bindir)/gforth-$(VERSION) bye"
@GNUMAKE@ $(PREFORTH) -e 's" $<" include $(srcdir)/kernel/main.fs' -e "save-cross $@- $(bindir)/gforth-$(VERSION) bye"
@GNUMAKE@ if [ -f `echo $< | sed s/fs/sh/` ]; \
@GNUMAKE@ then sh `echo $< | sed s/fs/sh/` $@; \
@GNUMAKE@ else $(CP) $@- $@; \
......@@ -1262,7 +1262,7 @@ doc/doc.fd: doc/makedoc.fs $(GFORTH_FI_SRC) $(EXTRA_DOC)
$(FORTHK) -e "s\" doc/doc.fd\"" doc/makedoc.fs except.fs startup.fs $(EXTRA_DOC) -e bye
doc/crossdoc.fd: $(KERN_SRC) kernel/version.fs $(FORTH_GEN0)
$(FORTHK) -e 's" mach32l.fs"' kernel/main.fs -e bye
$(FORTHK) -e 's" mach32l.fs" include kernel/main.fs' -e bye
doc/gforth.texi: doc/gforth.texi.in prim.b ds2texi.fs prims2x.fs \
doc/doc.fd doc/crossdoc.fd preforth @kernel_fi@
......
......@@ -565,6 +565,10 @@ fpath= ~+
\ \ -------------------- include require 13may99jaw
[IFDEF] add-included-file
' add-included-file alias h-add-included-file
[THEN]
>CROSS
: add-included-file ( adr len -- adr )
......@@ -2124,9 +2128,10 @@ X has? f83headerstring [IF]
dup T cell+ cfalign# H ht-nlstring, ;
[THEN]
: reset-included ( -- )
[IFDEF] loadfilename# loadfilename# off [THEN]
[IFDEF] current-sourcepos1 included-files $off
[ELSE] 0 allocate throw 0 included-files 2! [THEN] ;
[ELSE] 0 allocate throw 0 included-files 2! [THEN]
[IFDEF] loadfilename# loadfilename# off [THEN]
s" kernel/main.fs" h-add-included-file ;
: tsourcepos1 ( -- xpos )
sourcefilename str>loadfilename# sourceline#
input-lexeme 2@ drop source drop -
......
......@@ -71,11 +71,11 @@ has? kernel-size
doc-off
reset-included
has? prims [IF]
include kernel/aliases.fs \ primitive aliases
include ./aliases.fs \ primitive aliases
[ELSE]
prims-include
undef-words
include kernel/prim.fs
include ./prim.fs
all-words
[THEN]
doc-on
......@@ -88,23 +88,23 @@ AConstant image-header
\ 0 AConstant forthstart
\ include kernel/vars.fs \ variables and other stuff
\ include kernel/version.fs \ is in $(build)/kernel
include kernel/kernel.fs \ kernel
\ include kernel/errore.fs
include kernel/doers.fs
\ include ./vars.fs \ variables and other stuff
\ include ./version.fs \ is in $(build)/kernel
include ./kernel.fs \ kernel
\ include ./errore.fs
include ./doers.fs
has? file [IF]
include kernel/args.fs
include kernel/files.fs \ file words
include kernel/paths.fs
include kernel/require.fs
include ./args.fs
include ./files.fs \ file words
include ./paths.fs
include ./require.fs
[THEN]
has? compiler [IF]
has? glocals [IF]
include kernel/cond.fs \ IF and co.
include ./cond.fs \ IF and co.
[ELSE]
include kernel/cond-old.fs \ IF and co. withoutlocals
include ./cond-old.fs \ IF and co. withoutlocals
[THEN]
\ these two games can be added to provide complex examples for the 4stack
\ and misc simulators (see arch/4stack/README and arch/misc/README).
......@@ -114,17 +114,17 @@ has? compiler [IF]
include arch/misc/sokoban.fs
[THEN]
[THEN]
include kernel/quotes.fs
include ./quotes.fs
has? ec 0= [IF]
include kernel/toolsext.fs
include ./toolsext.fs
[THEN]
include kernel/tools.fs \ load tools ( .s dump )
include kernel/getdoers.fs
include kernel/copydoers.fs
include ./tools.fs \ load tools ( .s dump )
include ./getdoers.fs
include ./copydoers.fs
\ Setup 13feb93py
include kernel/pass.fs \ pass pointers from cross to target
include ./pass.fs \ pass pointers from cross to target
has? header [IF]
\ set image size
......
......@@ -27,7 +27,9 @@ AVariable included-files
\G loaded. If the current input source is no (stream) file, the
\G result is undefined. In Gforth, the result is valid during the
\G whole session (but not across @code{savesystem} etc.).
loadfilename# @
loadfilename# @ included-filename[] ;
: included-filename[] ( index -- c-addr u ) \ gforth
\G convert a file name index to a file name
dup -3 = IF drop s" *a block*" EXIT THEN
dup -2 = IF drop s" *evaluated string*" EXIT THEN
dup 0< IF drop s" *the terminal*" EXIT THEN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment