File:  [gforth] / gforth / INSTALL
Revision 1.34: download - view: text, annotated - select for diffs
Sun Mar 9 17:16:38 2003 UTC (16 years, 10 months ago) by anton
Branches: MAIN
CVS tags: v0-6-1, v0-6-0, HEAD
updated version number
documentation changes
minor changes

    1: Copyright (C) 2003 Free Software Foundation, Inc.
    2: This file is free documentation; the Free Software Foundation gives
    3: unlimited permission to copy, distribute and modify it.
    4: 
    5: You need gcc version 2.0 or later to compile gforth.
    6: 
    7: First, type
    8: 
    9: ./configure
   10: 
   11: (see Section Configuration Options below for details).
   12: 
   13: After configuration, type
   14: 
   15: make
   16: 
   17: Now you can check whether your shiny new Forth system works. Say
   18: 
   19: make check
   20: 
   21: You can run some benchmarks with
   22: 
   23: make bench
   24: 
   25: and compare them with the results in Benchres and in the manual.
   26: 
   27: If everything is all right, you may want to install gforth. Type
   28: 
   29: make install
   30: 
   31: For paper documentation, print gforth.ps (a Postscript file (300dpi
   32: fonts, i.e., it works, but does not produce best quality on better
   33: printers)), or say
   34: 
   35: make gforth.dvi
   36: 
   37: and print the resulting file gforth.dvi. You can also get the
   38: documentation in HTML format by typing
   39: 
   40: make html
   41: 
   42: If you prefer plain ASCII documentation, you can 
   43: 
   44: make doc/gforth.txt
   45: 
   46: or just concatenate the files gforth.info-* ('cat gforth.info-*' under
   47: Unix); the result of the latter option is a little worse.
   48: 
   49: You can find binary distributions, documentation in HTML and plain
   50: text format and information on known installation problems at
   51: http://www.complang.tuwien.ac.at/forth/gforth/.
   52: 
   53: 
   54: 		Configuration Options
   55: 
   56: If you use GNU make, you can build in a directory different from the
   57: source directory by changing to the build directory and invoking
   58: configure thus:
   59: 
   60: $srcdir/configure
   61: 
   62: where $srcdir is the source directory. (Note that we tested this only
   63: for installation; i.e., if you want to hack the Gforth sources, you
   64: should probably build in the source directory).
   65: 
   66: configure has the following useful parameters:
   67:   --prefix=PREFIX         install architecture-independent files in PREFIX
   68:                           [default: /usr/local]
   69:   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
   70:                           [default: same as prefix]
   71:   --enable-force-reg      Use explicit register declarations if they appear in
   72:                           the machine.h file. This can cause a good speedup,
   73:                           but also incorrect code with some gcc versions on
   74:                           some processors (default disabled).
   75:   --help: tells you about other parameters.
   76: 
   77: The file Benchres shows which combination of the -enable options we
   78: tried gave the best results for various machines.
   79: 
   80: If you don't like the defaults for the installation directories, you
   81: should override them already during configure.  E.g., if you want to
   82: install in the /gnu hierarchy instead of in the default /usr/local
   83: hierarchy, say
   84: 
   85: ./configure --prefix=/gnu
   86: 
   87: Moreover, if your GCC is not called gcc (but, e.g., gcc-2.7.1), you
   88: should say so during configuration. E.g.:
   89: 
   90: env CC=gcc-2.7.1 ./configure
   91: 
   92: You can also pass additional options to gcc in this way, e.g., if you
   93: want to generate an a.out executable under Linux with gcc-2.7.0:
   94: 
   95: env "CC=gcc -b i486-linuxaout -V 2.7.0" ./configure
   96: 
   97: You can change the sizes of the various areas used in the default
   98: image `gforth.fi' by passing the appropriate Gforth command line
   99: options in the FORTHSIZES environment variable:
  100: 
  101: env "FORTHSIZES=--dictionary-size=256k --data-stack-size=16k --fp-stack-size=15872b --return-stack-size=15k --locals-stack-size=14848b" ./configure
  102: 
  103: The line above reaffirms the default sizes. Note that the locals
  104: stack area is also used as input buffer stack.
  105: 
  106: If C's "long long" do not work properly on your machine (i.e., if the
  107: tests involving double-cell numbers fail), you can build Gforth such
  108: that it does not use "long long":
  109: 
  110: env ac_cv_sizeof_long_long=0 ./configure
  111: 
  112: 
  113: 			Cross-Installation
  114: 
  115: You need a cross-compilation toolchain for your target including gcc
  116: (2.0 or later).
  117: 
  118: The first step in cross-installation is the cross-configuration.  A
  119: few tests made by the configure script do not work in a
  120: cross-compilation situation. You have to provide the results of these
  121: tests by hand. E.g., if you compile for a 386 architecture processor:
  122: 
  123: env ac_cv_sizeof_char_p=4 ac_cv_sizeof_char=1 ac_cv_sizeof_short=2 ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_long=8 ac_cv_sizeof_intptr_t=4 ac_cv_sizeof_int128_t=0 ac_cv_c_bigendian=no ./configure
  124: 
  125: The ac_cv_sizeof_... variables give the sizes of various C types;
  126: ac_cv_sizeof_char_p is the same as "sizeof(char*)" in C code. The
  127: ac_cv_c_bigendian variable gives the byte order.
  128: 
  129: After the cross-configuration you type
  130: 
  131: make gforths
  132: 
  133: This produces the gforth engines for the target.
  134: 
  135: The next step is to transfer everything to the target; on the target,
  136: you do
  137: 
  138: make
  139: 
  140: to complete building gforth.  If you do not have a make on the target,
  141: run
  142: 
  143: make -n
  144: 
  145: on the host; manually execute on the target the last command output by
  146: "make -n" (GFORTHD=...); the other commands output by "make -n" are
  147: not necessary unless you have changed the Gforth sources.  You can
  148: then check and benchmark Gforth with
  149: 
  150: make check
  151: make bench
  152: 
  153: or equivalent.  Finally, perform
  154: 
  155: make install
  156: 
  157: or the equivalent commands on the target.
  158: 
  159: 
  160: 		Preloading installation-specific code
  161: 
  162: If you want to have some installation-specific files loaded when
  163: Gforth starts (e.g., an assembler for your processor), put commands
  164: for loading them into /usr/local/share/gforth/site-forth/siteinit.fs
  165: (if the commands work for all architectures) or
  166: /usr/local/lib/gforth/site-forth/siteinit.fs (for
  167: architecture-specific commands);
  168: /usr/local/lib/gforth/site-forth/siteinit.fs takes precedence if both
  169: files are present (unless you change the search path). The file names
  170: given above are the defaults; if you have changed the prefix, you have
  171: to replace "/usr/local" in these names with your prefix.
  172: 
  173: By default, the installation procedure creates an empty
  174: /usr/local/share/gforth/site-forth/siteinit.fs if there is no such
  175: file.
  176: 
  177: If you change the siteinit.fs file, you should run "make install"
  178: again for the changes to take effect (Actually, the part of "make
  179: install" starting with "rm gforth.fi" is sufficient).
  180: 
  181: 
  182: 		Multiple Versions and Deinstallation
  183: 
  184: Several versions of Gforth can be installed and used at the same
  185: time. Version `foo' can be invoked with `gforth-foo'. We recommend to
  186: keep the old version for some time after a new one has been installed.
  187: 
  188: You can deinstall this version of Gforth with 'make uninstall' and
  189: version foo with 'make uninstall VERSION=foo'. 'make uninstall' also
  190: tells you how to uninstall Gforth completely.
  191: 
  192: 
  193: 		Installing Info Files
  194: 
  195: Info is the GNU project on-line documentation format. You can read
  196: info files either from within Emacs (Ctrl-h i) or using the
  197: stand-alone Info reader, 'info'.
  198: 
  199: If you use the default install root of '/usr/local' then the info
  200: files will be installed in '/usr/local/info'.
  201: 
  202: Many GNU/Linux distributions are set up to put all of their
  203: documentation in '/usr/info', in which case you might have to do a
  204: couple of things to get your environment set up to accommodate files
  205: in both areas:
  206: 
  207: 1. Add an INFOPATH environment variable. The easiest place to do
  208: this is '/etc/profile', right next to PATH and MANPATH:
  209: 
  210: INFOPATH=/usr/local/info:/usr/info
  211: 
  212: 2. Create a file called 'dir' in 'usr/local/info'. Use the file
  213: '/usr/info/dir' as a template. You can add the line for gforth
  214: manually, or use '/sbin/install-info' (man install-info for details).
  215: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>