========================================================
(C)1993, 1994 Institute for New Generation Computer Technology
(Read COPYRIGHT for detailed information.)
========================================================

How to INSTALL KL1 to C compiler
================================
November 8, 1993
Last Revision: May 26, 1994
Takashi Chikayama (ICOT)

The following is an excerpt from KLIC.info in the directory
"documents".

Installation
************

   Installation of KLIC should be fairly easy.

   Host-dependent and preference-based customizations are made by
running the configuration script provided with the distribution.  Then
`make all' should compile the whole system.  You can make sure that the
system has been compiled without problems by running `make tests'.
Then you can install the system by `make install'.


Configuration
=============

   First thing to do in installation of KLIC is to configure the KLIC
system depending on the host computer system and your preference.

   First, go to the root directory of the distribution (referred to as
ROOT in what follows).  Then, run the configuration script there by a
command `./Configure'.  The script will search for available software
tools in your system and ask your preferences.

   The configuration script will make two files:
     `ROOT/Makefile'

and
     `ROOT/include/klic/config.h'.


Linux Specifics
---------------

   KLIC needs the `nlist' feature for symbolic debugging etc.  On Linux
1.0, at least with Slackware 1.2.0 distribution, the definition of
`nlist' structure is commented out by `#if 0' in the header file
`/usr/include/nlist.h'.  Simply uncommenting it by changing `#if 0' to
`#if 1' seems to make it work.  However, the `nlist' utility provided
with this Linux distribution is *very* slow.  Thus, tracing large
programs with KLIC on Linux may be painful.


Compiling the KLIC system
=========================

   After configuring the system, typing in `make all' should compile
the whole KLIC system, including the KL1 to C compiler and the runtime
libraries.


Testing the Compilation
=======================

   After system compilation is finished, you are recommended to test
whether the compilation went without problems.  To do that, type in
`make tests'.  This will compile and run several KL1 test programs and
compares the output with the expected output.


Installing the Objects
======================

   After compilation, typing in `make install' will install the
compiler, include files and runtime libraries to directories specified
on configuraion.


Cleaning Up the Installation Directory
======================================

   After installation has been done, typing in `make distclean' will
delete all the files *not* included in the distribution.

   Normal users should *not* try `make realclean', which will delete C
program source files generated from KL1.  A working KL1 to C compiler
will be needed to regenerate the C program source files.


When Something Goes Wrong
=========================

   When the installation procedure went wrong because of
misconfiguration, you would better start all over again from the
configuration step.  The configuraion script will ask you whether to
clean up the system for reconfiguration.  Please answer affirmative
then.

   If you think the problem is due to the distributed code, please
report your problem to the following address.
     `klic-bugs@icot.or.jp'
   Including information on your host system (hardware and operating
system) and your configuration (the top level `Makefile' and the file
`include/klic/config.h') would be quite helpful in analysing your
problem.
