| |
|
| PATHSEP = @PATHSEP@ |
PATHSEP = @PATHSEP@ |
| |
|
| osclass = @OSCLASS@ |
|
| |
|
| EC = @EC@ |
EC = @EC@ |
| |
|
| # ------------- Utility programs |
# ------------- Utility programs |
| LN_S = @LN_S@ |
LN_S = @LN_S@ |
| M4 = @M4@ |
M4 = @M4@ |
| GCC = @CC@ |
GCC = @CC@ |
| |
EMACS = emacs |
| |
LIBTOOL = @GNU_LIBTOOL@ |
| PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" |
PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" |
| CC = $(GCC) |
CC = $(GCC) |
| FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(siteforthdir)$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION) |
FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(siteforthdir)$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION) |
| hash.fs \ |
hash.fs \ |
| history.fs \ |
history.fs \ |
| intcomp.fs \ |
intcomp.fs \ |
| |
mkdir.fs \ |
| libcc.fs \ |
libcc.fs \ |
| locals.fs \ |
locals.fs \ |
| look.fs \ |
look.fs \ |
| |
mkdir.fs \ |
| quotes.fs \ |
quotes.fs \ |
| search.fs \ |
search.fs \ |
| see.fs \ |
see.fs \ |
| arch/mips/testasm.fs arch/mips/testdisasm.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 |
| |
|
| LIBCC_SRC = libffi.fs fflib.fs unix/socket.fs |
LIBCC_SRC = cstr.fs unix/socket.fs |
| |
|
| |
LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) |
| |
|
| FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) $(EC_SRC) $(LIBCC_SRC) \ |
LIBCC_BUILD_SRC = @LIBCC_BUILD_SRC@ $(LIBCC_SRC) |
| |
|
| |
FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) $(EC_SRC) $(LIBCC_DIST_SRC) \ |
| ans-report.fs ansi.fs answords.fs \ |
ans-report.fs ansi.fs answords.fs \ |
| colorize.fs comp-i.fs complex.fs \ |
colorize.fs comp-i.fs complex.fs \ |
| depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ |
depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ |
| |
|
| SOURCES = $(CVSDIRS) $(ENGINE_SOURCES) compat Makefile.in Makedist.in \ |
SOURCES = $(CVSDIRS) $(ENGINE_SOURCES) compat Makefile.in Makedist.in \ |
| gforthmi.in vmgen.in preforth.in gfgen README.vmgen NEWS.vmgen \ |
gforthmi.in vmgen.in preforth.in gfgen README.vmgen NEWS.vmgen \ |
| configure.in configure config.sub config.guess elisp-comp missing \ |
prims2x0.6.2.fs \ |
| stamp-h.in envos.fs.in \ |
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 \ |
iss.sh install-sh INSTALL INSTALL.BINDIST NEWS README ToDo BUGS \ |
| BUILD-FROM-SCRATCH model \ |
BUILD-FROM-SCRATCH model \ |
| COPYING COPYING.LIB COPYING.DOC AUTHORS ChangeLog Benchres aclocal.m4 \ |
COPYING COPYING.LIB COPYING.DOC AUTHORS ChangeLog Benchres aclocal.m4 \ |
| echo ": version-string s\" $(VERSION)\" ;" > kernel/version.fs |
echo ": version-string s\" $(VERSION)\" ;" > kernel/version.fs |
| |
|
| more: $(ENGINES) $(FORTH_GEN) $(GEN) |
more: $(ENGINES) $(FORTH_GEN) $(GEN) |
| |
test -n "$(LIBTOOL)" && $(MAKE) build-libcc-named |
| @$(MAKE) check |
@$(MAKE) check |
| |
|
| #from the gcc Makefile: |
#from the gcc Makefile: |
| $(INSTALL_PROGRAM) gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(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)) |
(cd $(DESTDIR)$(bindir) && $(LN_S) gforth-itc-$(VERSION)$(EC)$(EXE) gforth-itc$(EC)$(EXE)) |
| $(INSTALL_SCRIPT) gforthmi $(DESTDIR)$(bindir)/gforthmi-$(VERSION) |
$(INSTALL_SCRIPT) gforthmi $(DESTDIR)$(bindir)/gforthmi-$(VERSION) |
| #$(INSTALL_SCRIPT) vmgen $(DESTDIR)$(bindir)/vmgen-$(VERSION) |
$(INSTALL_SCRIPT) vmgen $(DESTDIR)$(bindir)/vmgen-$(VERSION) |
| $(INSTALL_PROGRAM) gforth-ditc $(DESTDIR)$(libdir)/gforth/$(VERSION) |
$(INSTALL_PROGRAM) gforth-ditc $(DESTDIR)$(libdir)/gforth/$(VERSION) |
| (cd $(DESTDIR)$(bindir) && $(LN_S) gforthmi-$(VERSION) gforthmi) |
(cd $(DESTDIR)$(bindir) && $(LN_S) gforthmi-$(VERSION) gforthmi) |
| #(cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) |
(cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) |
| -$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) |
-$(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 $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done |
| -for i in $(srcdir)/doc/gforth.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done |
|
| for i in $(FORTH_SRC) $(COMPAT) prim; do \ |
for i in $(FORTH_SRC) $(COMPAT) prim; do \ |
| $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ |
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ |
| done |
done |
| $(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(datadir)/gforth/$(VERSION) |
$(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(datadir)/gforth/$(VERSION) |
| @if test -d "$(DESTDIR)$(emacssitelispdir)"; then \ |
@if test -d "$(DESTDIR)$(emacssitelispdir)"; then \ |
| |
$(INSTALL_DATA) gforth.el $(DESTDIR)$(emacssitelispdir); \ |
| $(INSTALL_DATA) gforth.elc $(DESTDIR)$(emacssitelispdir); \ |
$(INSTALL_DATA) gforth.elc $(DESTDIR)$(emacssitelispdir); \ |
| else \ |
else \ |
| echo ">>>>>Please install gforth.elc in your .../emacs/site-lisp directory"; \ |
echo '>>>>>Please install gforth.{el,elc} in your .../emacs/site-lisp directory'; \ |
| fi |
fi |
| -$(RM) gforth.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 --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) |
GFORTHD="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) -i $(kernel_fi)" GFORTH="./gforth-ditc --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) |
| $(INSTALL_DATA) install.TAGS $(DESTDIR)$(datadir)/gforth/$(VERSION)/TAGS |
$(INSTALL_DATA) install.TAGS $(DESTDIR)$(datadir)/gforth/$(VERSION)/TAGS |
| $(RM) gforth.fi install.TAGS |
$(RM) gforth.fi install.TAGS |
| $(INSTALL_DATA) include/gforth/$(VERSION)/* $(DESTDIR)$(includedir)/gforth/$(VERSION) |
$(INSTALL_DATA) include/gforth/$(VERSION)/* $(DESTDIR)$(includedir)/gforth/$(VERSION) |
| for i in $(LIBCC_SRC); do libtool --silent --mode=install $(INSTALL) lib/gforth/$(VERSION)/libcc-named/`basename $$i .fs`.la $(DESTDIR)$(libccdir)`basename $$i .fs`.la; done |
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; \ |
| |
done; fi |
| $(POST_INSTALL) |
$(POST_INSTALL) |
| $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gforth.info |
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gforth.info |
| #$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/vmgen.info |
#$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/vmgen.info |
| -$(RM) -rf $(DESTDIR)$(libdir)/gforth/$(VERSION) $(DESTDIR)$(datadir)/gforth/$(VERSION) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi-$(VERSION) $(DESTDIR)(bindir)/vmgen-$(VERSION) $(DESTDIR)$(includedir)/gforth/$(VERSION) |
-$(RM) -rf $(DESTDIR)$(libdir)/gforth/$(VERSION) $(DESTDIR)$(datadir)/gforth/$(VERSION) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi-$(VERSION) $(DESTDIR)(bindir)/vmgen-$(VERSION) $(DESTDIR)$(includedir)/gforth/$(VERSION) |
| @echo -e "To remove Gforth completely, type\n$(RM) -rf $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen $(DESTDIR)$(man1dir)/gforth.1 $(DESTDIR)$(infodir)/gforth.info* $(DESTDIR)$(datadir)/gforth $(DESTDIR)$(libdir)/gforth" |
@echo -e "To remove Gforth completely, type\n$(RM) -rf $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen $(DESTDIR)$(man1dir)/gforth.1 $(DESTDIR)$(infodir)/gforth.info* $(DESTDIR)$(datadir)/gforth $(DESTDIR)$(libdir)/gforth" |
| |
|
| check-libcc-named: $(LIBCC_SRC) |
build-libcc-named: $(LIBCC_BUILD_SRC) $(FORTH_GEN) $(GEN) FORCE |
| $(RMTREE) lib/gforth/$(VERSION)/libcc-named/ |
$(RMTREE) lib/gforth/$(VERSION)/libcc-named/ |
| $(srcdir)/mkinstalldirs 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" $$i -e bye; done |
| for i in $(LIBCC_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" $$i -e bye; done |
|
| |
|
| check: gforths gforth.fi |
check: gforths gforth.fi |
| $(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 |
$(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 |
| $(MAKE) checkone ENGINE="./gforth-fast --no-dynamic" >/dev/null 2>&1 |
$(MAKE) checkone ENGINE="./gforth-fast --no-dynamic" >/dev/null 2>&1 |
| $(MAKE) checkone check-nofast ENGINE="./gforth" >/dev/null 2>&1 |
$(MAKE) checkone check-nofast ENGINE="./gforth" >/dev/null 2>&1 |
| $(MAKE) checkone ENGINE="./gforth-fast" >/dev/null 2>&1 |
$(MAKE) checkone ENGINE="./gforth-fast" >/dev/null 2>&1 |
| $(MAKE) check-libcc-named |
|
| @echo "*** Check successful ***" |
@echo "*** Check successful ***" |
| ./gforth-fast --diag -e bye |
./gforth-fast --diag -e bye |
| |
|
| MAKELINE-ll = OPT=-ll OPTDEFINES=-DFORCE_LL OPTOBJECTS= |
MAKELINE-ll = OPT=-ll OPTDEFINES=-DFORCE_LL OPTOBJECTS= |
| MAKELINE-noll = OPT=-noll OPTDEFINES= OPTOBJECTS=dblsub.o |
MAKELINE-noll = OPT=-noll OPTDEFINES= OPTOBJECTS=dblsub.o |
| |
|
| gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/config.h |
gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/config.h @kernel_anti_dependence@ |
| if test -z "$(OPT)"; then \ |
if test -z "$(OPT)"; then \ |
| for i in $(OPTS); do $(MAKE) optgforth OPT=$$i && $(CP) gforth$${i}$(EC)$(EXE) $@ && break; done; \ |
for i in $(OPTS); do $(MAKE) optgforth OPT=$$i && $(CP) gforth$${i}$(EC)$(EXE) $@ && break; done; \ |
| else \ |
else \ |
| ( cd engine && $(MAKE) $@ ) && \ |
( cd engine && $(MAKE) $@ ) && \ |
| $(CP) gforth$(OPT)$(EC)$(EXE) gforth~; \ |
|
| $(CP) engine/$@ $@ && \ |
$(CP) engine/$@ $@ && \ |
| $(MASSAGE_EXE) $@; \ |
$(MASSAGE_EXE) $@; \ |
| @GFORTH_EXE@; \ |
@GFORTH_EXE@; \ |
| |
|
| # ------------- additional C primitives |
# ------------- additional C primitives |
| |
|
| %.c: %.pri prim2cl.fs |
.SUFFIXES: .c .pri |
| |
|
| |
.pri.c: $< prim2cl.fs |
| $(FORTHK) prim2cl.fs -e "file $< altogether bye" >$@ |
$(FORTHK) prim2cl.fs -e "file $< altogether bye" >$@ |
| |
|
| %.so: %.c |
.c.so: $< |
| $(GCC) -shared $(CFLAGS) $(CPPFLAGS) $< -o $@ |
$(GCC) -shared $(CFLAGS) $(CPPFLAGS) $< -o $@ |
| |
|
| # ------------- Make Documentation |
# ------------- Make Documentation |
| |
|
| #elc files |
#elc files |
| gforth.elc: gforth.el |
gforth.elc: gforth.el |
| emacs -batch -f batch-byte-compile $< |
-$(EMACS) -batch -f batch-byte-compile gforth.el |
| |
|
| #Documentation |
#Documentation |
| |
|
| checkdoc: doc/gforth.ds prim.b ds2texi.fs prims2x.fs doc/doc.fd doc/crossdoc.fd answords.fs doc/gforth.texi |
checkdoc: doc/gforth.ds prim.b ds2texi.fs prims2x.fs doc/doc.fd doc/crossdoc.fd answords.fs doc/gforth.texi |
| $(FORTH) ds2texi.fs prims2x.fs -e "s\" $(srcdir)/prim.b\" ' register-doc ' noop process-file" doc/crossdoc.fd doc/doc.fd answords.fs -e bye |
$(FORTH) ds2texi.fs prims2x.fs -e "s\" $(srcdir)/prim.b\" ' register-doc ' noop process-file" doc/crossdoc.fd doc/doc.fd answords.fs -e bye |
| -grep unknown doc/gforth.texi |
-grep unknown doc/gforth.texi |
| -grep doc- doc/gforth.texi |
-grep doc- doc/gforth.texi| grep -v '^@c' |
| |
|
| dvi: doc/gforth.dvi doc/vmgen.dvi |
dvi: doc/gforth.dvi doc/vmgen.dvi |
| |
|