The `install` Command

Usage

`install [-interactive] [-debug] [-cc <c_compiler>] [-skip_c_compilation]`

The `install` command is the installation program for SmartEiffel The GNU Eiffel Compiler.
This command (class `install.e`) is written entirely in Eiffel and is the one recommended for installing SmartEiffel The GNU Eiffel Compiler.

The `install.e` source code as well as the generated C code `install.c` are in the SmartEiffel directory.

The very first step in installing SmartEiffel is to unpack the SmartEiffel directory somewhere on disk. The second step is to set the "`SmartEiffel`" environment variable to the full path leading to the "`SmartEiffel/sys/system.se`" file. The last step is to compile the install.c (it is precompiled for Windows) file and to run it from the SmartEiffel directory.

The install command will do the rest of the work and will try to report possible problems. See the examples below.

Example for UNIX

As an example, we assume below that we want to install SmartEiffel in the directory `/foo/SmartEiffel/`. If you are using `bash`, add the following two lines to your .bashrc file:

> `export SmartEiffel=/foo/SmartEiffel/sys/system.se
> export PATH=/foo/SmartEiffel/bin:$PATH
> `

If you are using `csh` or `tcsh`, add the following two lines to your .cshrc file:

> `setenv SmartEiffel /foo/SmartEiffel/sys/system.se
> setenv PATH /foo/SmartEiffel/bin:$PATH
> `

Don't forget to open a new terminal window in order to take into account the new settings of the `SmartEiffel` and `PATH` variables. Then, in this new terminal window, just type the following commands:

> `cd /foo
> gunzip se.tgz (or bunzip2 se.tar.bz2)
> tar xvf se.tar
> cd SmartEiffel
> make
> `

You now just have to wait for the compiler installation to complete. Actually, it may take some time because all of the tools are recompiled from scratch using the Eiffel source code of SmartEiffel itself.

If you want to select manually the C compiler to be used (the default under UNIX is gcc), you should consider typing "`make interactive`" instead of just "`make`" (see the description of the -interactive option below). If your system has no gcc installed, compile `install.c` yourself and run it with `-interactive` option.

Example for Windows

The first step under Windows is to get a C compiler working on your computer. If you don't already have a C compiler installed, I recommend the LCC-Win32 compiler (a free C compiler system for Windows by Jacob Navia, `http://www.cs.virginia.edu/~lcc-win32/` or `http://www.q-software-solutions.com/lccwin32/`).

At this point, it is assumed you have a C compiler installed. Further, we assume below that we want to install SmartEiffel in the `C:\SmartEiffel` directory. The most difficult step now is to set the "`SmartEiffel`" variable to the appropriate value, which is actually: "`C:\SmartEiffel\sys\system.se`". Setting environment variables is different from one Windows system to another. For example, on Windows NT you have to look in the `system` windows to change environment variables. On Windows 95, you have to add the following two lines to your `AUTOEXEC.BAT` file:

> `set SmartEiffel=C:\SmartEiffel\sys\system.se
> set PATH=C:\SmartEiffel\bin:%PATH%
> `

The last step is to open a DOS command window and to type the following commands:

> `C:
> cd SmartEiffel
> install.exe
> `

You now just have to wait for the compiler installation to complete. Actually, it may take some time because all of the tools are recompiled from scratch using the Eiffel source code of SmartEiffel itself.

Example for Other Systems

For elate and OpenVMS systems, you can use "`make elate`" or "`make openvms`".
On other systems, the very first step for installation is to compile the `install.c` file in order to run it.

Options

-interactive:
  By default, the `install` command tries to determine automatically the system name as well as the C compiler name. When the -interactive flag is used, the user is interactively prompted for the system name and the C compiler to use as well as some other crucial information. When all of the information has been interactively gathered, the command prompts for confirmation before starting the remainder of the installation process automatically. Using the -interactive flag first is a good idea, to see the list of supported systems and C compilers.
-debug:
  Displays a lot of information useful for debugging the installation process. It is also interesting if you are curious to see what the `install` command is really doing (or trying to do ;) ).
-cc <c_compiler>:
  By default, `install` interactively asks for the C compiler to use. With this option specified, it skips this query and uses c_compiler. This c_compiler name must be one of the supported C compilers (e.g. `gcc`). This is mostly useful for system-specific installation scripts that execute `install` as part of it.
-skip_c_compilation:
  Assumes that all commands are already compiled and their executables exist. This is useful only for binary distributions.

Copyright © Dominique COLNET and Suzanne COLLIN - <SmartEiffel@loria.fr>
Last modified: Thu Sep 5 13:16:54 MET DST 2002