Release Notes for GNAT for OS/2
-------------------------------

   GNAT is free software;  you can  redistribute it  and/or modify it under
   terms  of the GNU  General  Public  License  as  published  by the  Free
   Software  Foundation;  either version 2,  or (at your option)  any later
   version.  GNAT is distributed  in the hope  that it will be useful,  but
   WITHOUT ANY WARRANTY;   without even the implied warranty of  MERCHANTA-
   BILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public
   License  for  more details.  You should have received  a copy of the GNU
   General Public License along with GNAT;  see file COPYING. If not, write
   to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

   This version of GNAT is a release of work in progress, it is known to be
   incomplete in many respects, but we are releasing it at this time to the
   Ada community so that people can start to familiarize themselves with the
   system and its general organization and capabilities. Up to date versions
   of the system along with full sources may be FTP'ed from cs.nyu.edu,
   directory pub/gnat. The README file there gives constant updates and what
   is available and workarounds for any problems that come up after a
   particular distribution is released.

      To report difficulties, comment on the system or make suggestions,
      send email to

	gnat-report@cs.nyu.edu

      To put yourself on our external mailing list, send email to

	gnat-request@cs.nyu.edu

Installation Notes
------------------

  You need OS/2 version 2.0 or later installed with an HPFS partition on your
  local hard drive having about 13 megabytes of free disk space. Please note
  that GNAT for OS/2 does not work if it is installed on a non-local hard
  drive, such as on a file server.

  Starting with GNAT 2.03, GNAT uses the EMX port of GCC for OS.2. There are
  several apparent differences from previous versions of GNAT. GNAT 2.03 and
  successive versions will:
    1.  generate .o files (a.out format) rather than .obj (OMF format)
        object files.
    2.  use .a (Unix archive) format libraries rather than .lib libraries
    3.  create object libraries using "ar" rather than the "LIB" utility
    4.  use the GNU ld (linker) rather that LINK386
    5.  allow for the use of GDB, the GNU symbolic debugger.

   GNAT 2.03 and successive versions reside under the the \emx hierarchy
   rather than the \gcc hierarchy where past versions resided. The \gcc
   hierachy can now be removed (and probably should be removed).

   Continue the installation by typing:

      x:\emx\bin\fly-gnat x:

      where x: is the HPFS partition where GNAT was installed.

  This will set the following changes to the environment

    PATH x:\emx\bin;%PATH%
    SET ADA_INCLUDE_PATH=x:\emx\gnatlib
    SET ADA_OBJECTS_PATH=x:\emx\gnatlib
    SET C_INCLUDE_PATH=x:/emx/include
    SET LIBRARY_PATH=x:/emx/lib
    SET EMXOPT=-c -n
    SET TMP=x:\emx\temp

  This will have to be done every time you open an OS/2 window, and you may
  find it convenient to edit the config.sys file using epm or some other
  appropriate editor to make these changes permanent. This will of course
  require a shutdown and reboot.

  To finish the installation:

  Add x:\emx\dll (insert the correct drive letter for x) to the front of the
  LIBPATH statement in your config.sys file. Reboot your computer to enable
  the new LIBPATH statement. Note: this is not an enviroment variable and
  can only be changed by modifying the config.sys only.

  To verify that GNAT has been installed correctly, make \emx\gnat\examples
  your current directory, and type

    makeexam

  This will compile, link and execute all the GNAT example programs.

Running the GNAT compiler
-------------------------

  If you haven't modified config.sys as described above, you need to make sure
  that the variables PATH, ADA_INCLUDE_PATH, ADA_OBJECTS_PATH, C_INCLUDE_PATH,
  LIBRARY_PATH and TMP are set as described above. The fly-gnat.cmd that was
  invoked above creates a batch file called setgnat.cmd that contains the
  necessary statements, so you can just issue the command "setgnat" (once
  \emx\bin is put on your path) to make sure that these variables are set.

  Detailed instructions on how to invoke GNAT are in the file
  x:\emx\gnat\gnatinfo.txt, included in this distribution.

  Note that gcc.exe has been setup to search for the executables it invokes
  first in the current directory, and then on the directories listed in the
  PATH environment variable. No other directories are searched. If you want
  gcc.exe to always look in only a particular directory, say, C:\EMX\BIN, then
  you can set the GCC_EXEC_PREFIX environment variable as follows:

    SET GCC_EXEC_PREFIX=C:\EMX\BIN\

  You may want to put such a statement in your config.sys file. Note that a
  backslash must appear at the end of the directory name. If gcc.exe can't find
  the executables it needs to invoke in this directory, it will continue its
  search as outlined above.

  Also, the C preprocessor has been set up to expect the standard header files
  to be located in the directories listed in the C_INCLUDE_PATH environment
  variable. It does not search any other directories. As is the case with the
  PATH environment variable, separate the directories listed in the
  C_INCLUDE_PATH variable with semicolons.

  You should not need to modify these environment variables, though. Running
  the setgnat.cmd batch file should be sufficient.

Important changes: -- please read
---------------------------------

The previous restriction in GNAT 2.03 of having the environment variable
TZ be set to null has been lifted with GNAT 2.04. GNAT now does not care
whether the TZ variable is set or not.

The EMX port of GCC by default generates a "core" file and pops up an exception
window when a program terminates execution abnormally (crashes). This can be
avoided by "SET EMXOPT=-c -n" which disables this behavior. This is also done
automatically by setgnat.cmd.

When executing "gnatbl xxx.ali", any existing file called "xxx" will be
deleted. This is done by the EMX binder when converting the executable from
a.out to exe format. So be carful not to have any such a file lying around.

Troubleshooting any installation problems:
------------------------------------------

 Make sure you have:

 1. Unzipped the four required zip files.

 2. Set LIBPATH to the appropriate \EMX\DLL directory in
    the config.sys file and that the machine was rebooted.

 3. Run the fly-gnat.cmd command file.

 4. PATH and all the other environment variables are set correctly
    (ADA_INCLUDE_PATH, ADA_OBJECTS_PATH, C_INCLUDE_PATH, LIBRARY_PATH,
     TZ and TMP). These should all be set by the setgnat.cmd file.

 5. GCC_EXEC_PREFIX pointing to the correct directory which contains
    gnat1.exe if this variable is set. Setting the GCC_EXEC_PREFIX variable
    is optional but if it set, it must be set correctly.

 6. If everything seems correct but you still have trouble, send email
    to gnat-report@cs.nyu.edu.
--------------------------------

Special Note: For those already using EMX and wish to install the GNAT
    supplied EMX files you will have to close down all your EMX based
    applications otherwise you will not be able to overwrite your existing
    EMX.DLL.

Special OS/2 Command Files
--------------------------

  We have provided two special batch files which reduce the amount of typing
  required to compile programs. They are in the \emx\bin directory. The first
  of these is cc.cmd. This batch file compiles a single source file specified
  on the command line, producing a .o file. So to create file.o from
  file.c, you can type

    cc file.c

  The second batch file is called gnat.cmd, and it compiles the main program,
  and binds and links it using gnatbl. So to compile the file main.adb, bind
  it and link it, you can type

    gnat main

  The generated executable file will be called main.exe.

Making Additional Copies
------------------------

  A batch file has been included to make it easy to generate diskettes to
  propagate the system:

    makefloppies a:   generates the diskettes for the system on drive a:
		      (change the drive name if necessary)


Directory structure of GNAT
---------------------------

  The installation creates the following directory structure on your hard disk
  partition:

    \emx	    a root directory containing some information files

    \emx\bin	    contains the executables and some standard batch files

    \emx\dll        contains DLLs needed by GCC and GNAT.

    \emx\gnat       contains documention, features update, current bugs

    \emx\gnat\examples
                    contains some sample code to verify that GNAT was
                    installed correctly.

    \emx\gnatlib    contains sources, object files of the GNAT RTL
                    (Run-Time Library)

    \emx\include    contains header files needed by C compilations

    \emx\lib	    a library directory providing standard runtime libraries

    \emx\temp	    a directory used for temporary files

Additional Documentation
------------------------
  More on the EMX system can be found in the \emx\doc directory which is
  contained in the distribution. The emx\doc\readme.doc gives a nice overview.
  In future releases of GNAT, more documentation on using GNAT with EMX will
  be provided. If anything in particular is unclear or you think more
  information on an area should be included please send mail to
  gnat-report@cs.nyu.edu.

Additional sources and binaries for EMX port of GCC
---------------------------------------------------
  The EMX port of the GCC system that is distributed as EMX09A-BIN-DISK*.ZIP
  is a minimal part of the EMX port necessary to run GNAT. The full EMX
  development distribution along with sources and other utilites can be
  obtained via anonymous ftp to ftp.cdrom.com:/pub/os2/32bit/unix/emx9a.

Current State of the System
---------------------------

  The file \emx\gnat\features, included in this distribution, outlines which
  features are implemented and which are not.

	The GNAT Team
	New York University
	March, 1995
        gnat-report@cs.nyu.edu
