REFERENCE:


EON EXECUTIVE:


The main compiler stages are run from an executive program called "eon".
This has the compilicated task of taking a root class and a system 
description file and compiling out-of-date dependant classes. It then
goes on to produce an executable program. The programmer has various
options to control this process.


A normal compilation, in which a root class is to be compiled, will 
perform the following steps:


* Read C++ compiler definitions file

* Locate and open the database (creating and initialising if it does not exist)

* Read the lace file for the given class name

* Determin a list of out-of-date dependant classes
	- check inheritance classes. If an ancestor is out of date, include
	  that class and all descendants 
	- check generic information. Include if the class has generic parameters
	  and one of those is out of date
	- check supplier classes

* Rebuild AST files and update database for all out-of-date dependants. This
   is done for all in before the full compilation stage. Produce .t files.

* Perform C++ code generation from out-of-date classes. If it was a supplier
   class this is only necessacery if the class interface has changed

* Run C++ compiler for all required files. This is not the same as just 
   running the C++ stage on the out-of-data classes. The task is to build
   object files from C++ source so if the object files have been removed or
   the C++ code changed, this stage still takes place. 

* Add modified object files to the library. As in the previous stage, this
   is not just a question of adding out-of-date classes. Any updated object
   file is added.

* Link the final program


Command line options
~~~~~~~~~~~~~~~~~~~~

The basic command is a single class name.

Example:
	
	eon sales
	eon SALES
	eon sales.e

	These will compile the class SALES in the current directory. In each case
	the source code will be expected to be in the file "sales.e".


The folloing options control the way "eon" works and the output generated.
If no options or names are specified, a help message is displayed.


-b			Build entire cluster. This is an automatic update of each
			class in a cluster. It does not compile root classes and can
			be used to compile all source files regardless of their 
			dependancy upon others.

			Example:

		 	eon -c /usr/eon/intrinsic -b

-c pathname	Cluster name for class to be compiled. If this option is not
			specified the current directory is used.

			Example:
			
			eon -c /usr/accounts sales

			This compiles the class SALES in the cluster ACCOUNTS found
			by the path /usr/accounts.

-d			Describe compilation stages. This option prints a short
			message at the major points in the compilation so that 
			progress can be observed.

			Example:

			eon -d sales


-n classname	Specify non-root class name. "classname" is compiled directly
			rather than part of the compilation process of a root class.
			This can be useful for syntax checking a class while it is
			being developed.

			Example:

			eon -n string

			This compiles the class "string" which is not a root class.
			Suppliers and ancestors of "string" will be recompiled if
			necessary.


-p 			Preserve generated C code files. If the compilation fails
			for some reason, C++ source files are normaly deleted. If 
			the error was causes by C++ being unable to compile the 
			generated code, this option allows that code to be inspected.
			Beware, that when "eon" is rerun it will think that the C++
			file is up-to-date and not compile it. In such cases delete
			the C++ source file by hand.

-r			Rebuild the runtime system. If the runtime modules
			(eiffel_rt & tracb) have been changed, this option will compile
			the source files and add them to the appropriate library.

				
-u directory name
			Set universe name. "directory name" must be set to a directory
			that contains (or is able to contain) a system database. 
			This option is similar the function served by the EON
			environment variable when it is used to locate the database.
			However, the option will relocate the database only, not the
			configuration files.

			Example:

			eon -u /compiler/tmp test

			The database /compiler/tmp/class.edb is used rather than the
			main database.


-v [1-2]		Set level of verbosity. The amount of diagnostic output can be 
			configured to help diagnose problems with the compilation
			process. Level 1 is the minimum setting. Levels higher than
			2 are only really for use in the development of the compiler
			itself.


-z			Clean up cluster directory. This option will scan a cluster
			for any class source code files and delete the associated files
			that were generated by the compiler. Although this option
			can be used to create more space on a full disc the files
			will probably be regenerated when a system using that
			cluster is compiled.




Configuration
~~~~~~~~~~~~~

When "eon" first runs, a number of files are read. If any of these are
unavailable, they may be created or the compilation aborted.

* The database. If a database is not found, a new one is created (after
  the programmer has been prompted to make sure this is the correct course
  of action). The database base is initialised and the the intrinsic class
  library is located and built. This may take some time so copying a fresh
  database from elsewhere is a better approch.

* The system description file (Lace). If "eon" was run with the intention of
  compiling an executable program, a Lace file will be required. If there is
  not one matching the name of the root class specified, the programmer is
  prompted and a basic file created. This contains the minimum specification
  and will almost certainly need attention.

  Example for a class called `test':

 -----------------------------------
|	root						|
|        	test					|
|							|
|	creation					|
|        	make					|
|							|
|	generate					|
|        	executable:"test"		|
|							|
|	cluster					|
|        	$(EON)/intrinsic		|
|							|
 -----------------------------------


* The C++ compiler configuration file. If this is missing, "eon" terminates.


  
