Installation on Amiga (AmigaDOS):
---------------------------------

1. Install a GNU GCC development platform

   In 1992, both DICE-2.06.37 and Lattice-5.04 were tested for
   suitability. Because of various bugs, they were not able to compile the
   CLISP source.

   I managed to compile early versions of CLISP on my stock B2000 with 5MB
   of RAM and gcc-1.40, throwing every program out of the machine
   (including RAM: and LoadWB) and running each compiler stage
   separately. Luckily, when I hit GCC bugs, newer bug-freed versions were
   available. Now I have 10MB of RAM which is just enough with GCC >=
   2.3. GCC-2.3.3 contains some bugs that required me to hand-patch the
   files stream.s and pathname.s. I use GCC-2.5.8 now.

2. Install Amiga includes

   They are copyrighted by Commodore-Amiga and can be obtained by CATS
   (Commodore-Amiga Technical Support) or on Fred Fish CDs. See your Amiga FAQ.

3. Make directory trees

   I recommend clisp/make.low/ for the *-low version, clisp/make.high/ for
   the *-high version and clisp/make.wide for the *-wide version (see file
   README.Amiga for what these are). Source should be in clisp/src/ (all you
   need are the files *.d, *.h and *.lsp), and utilities (only comment5 and
   ansidecl are needed) in clisp/utils/.

4. Ixconfig

   In order to find include files located in /src/ relatively to the make.*
   directory, ixemul.library shouldn't translate /. As sh (called by make)
   doesn't seem to be able to handle this situation, a workaround is to
   assign src: and utils: to the src and utils directories respectively.

5. Check your stack sizes

   gcc-cc1 uses up to 380000 bytes of stack in EVAL.D.
   gcc-cpp and gcc-as get along with 20000 bytes.
   gcc-ld requires 180000 bytes.

   This is current stack usage and can increase when adding new features to
   CLISP. If your make program can't set stack sizes, you'll have to run
   everything with the maximum stack. This is why I have a private make
   program that recognizes and honours the stack command.

6. Make the clisp support library found in amiga/jchlib/

   This is a micro C startup library containing the bare minimum to start a
   program from CLI or WorkBench and setjmp() and strlen(). It's used by
   CLISP but could be by other programs too. It doesn't require
   ixemul.library. From WorkBench, it opens the window specified by the
   WINDOW tooltype and supports project icons (currently all in the same
   directory only).

   Compiling CLISP without using my library has never been
   tested. Furthermore, CLISP now uses the setmode() function from this
   library which is not found in a standard C library.

7. Makefile

   Due to lack of RAM (I have 10 MB :-), big CLISP source files and the huge
   stack needed by cc1, it was not possible for me to use a generic Makefile
   and simply run gcc with a stack set to 380000 bytes. That's why I'm using
   a private make which nobody but I has. It recognizes the stack command.
   Furthermore my Makefile calls each compiler stage directly, saving the
   space for the gcc driver.

   Now, with the normal make, I nevertheless managed to build CLISP by
   running VMM, a virtual memory manager and setting the stack before
   starting make. It's a huge waste and won't run in a 10MB system without
   virtual memory, but you could also use this. Link or copy the /bin/true
   command to make.*/stack so that /bin/sh will find a stack command (it's
   called by the Makefile). If /bin/sh can't find cc1, cpp etc. because they
   are deep inside the gcc-lib hierarchy, set a local variable PATH to all
   the paths. Make and thus sh will inherit this variable:

	set PATH /gnu/bin:/gnu/lib/gcc-lib/mc680x0-cbm-amigados/2.x.x:/C:/utils/:.

8. Edit

       make.*/Makefile

   according to your choices and tastes. By default, you'll make the
   international (well, english, french and german) version of CLISP, which
   requires more space than a single language one that can be built by
   adding -DENGLISH, -DFRANCAIS or -DDEUTSCH flags to the compiler. See
   src/lispbibl.d for everything that can be defined. The amiga or AMIGA
   define serves to recognize the Amiga (don't set them for now under
   Amiga-UNIX). Interesting preprocessor flags include AMIGA3000, MC680Y0
   for 68020 or better (implied by AMIGA3000), MC68000 for 68000 only, WIDE
   for 64 bit ints (for 32 bit clean pointers).

9. Edit

       src/config.lsp
       src/timezone.lsp

   See README for the one line to modify in timezone.lsp. In config.lsp,
   you may wish to set your favourite editor or restrict the load-path.

10. Remove

   Every $ from the file src/ari68020.mit.d and rename it src/ari68020.d
        sed > ari68020.d -e "s/$//" ari68020.mit.d
   Quote $ according to your shell conventions and sed version.

11. Copy,

   rename or link src/ari68000.mit.d to src/ari68000.d

12. Type

        make    (while in a make.* directory)	(-low)
        make HIGH=1				(-high)
        make WIDE=1				(-wide)

   and wait for things to happen. One night on a B2000, more than one hour
   on an A4000/40.

   Hint: use FIFO: (by Matt Dillon) in order to get a logfile.
        NewShell FIFO:shell/rwkecs
        Run >nil: remcli shell
        Run >nil: cat FIFO:shell/rmt >>compile.log
        echo "Log going into compile.log."
   Or use KingCon, ConsoleBuffer or else the Recorder program from the
   hacks204 archive by Andy Finkel (doesn't seem to work with 3.0).

13. Type

        make interpreted.mem     a memory image with everything
                                  uncompiled (size 1.7MB)
        make compiled.mem        makes all *.fas files and
                                  a memory image with everything
                                  compiled (size 500KB, 1MB for wide version)
   The second step is the most time consuming.

14. A test-suite

   The directory clisp/tests/ contains a large number of test files. While in
   CLISP, do

	(cd "/tests/")
	(load "tests")
	(run-all-tests)

   and have a look at possibly resulting .erg files. Only alltest.erg and
   array.erg should remain and report some limit or fixnum differences.

15. Documentation

   Unluckily for an Amiga-only site, I generated the .man file on a UNIX
   box and displayed it in an EMACS buffer (M-x man) from where I saved it.
   I'd like to know about better ways to do this.


Authors:
--------

        Bruno Haible                    Michael Stoll
        Augartenstrae 40               Gallierweg 39
    D - 76137 Karlsruhe             D - 53117 Bonn
        Germany                         Germany

Email: haible@ma2s2.mathematik.uni-karlsruhe.de

Amiga Port by:
--------------

        Jrg Hhle
        Radolfzeller Strae 3
    D - 78476 Allensbach
        Germany

Email: hoehle@inf-wiss.uni-konstanz.de
