Up Top       Prev Menu      Next compile_to_c


The se-compile command



Usage

se-compile [-clean] [-verbose] [compile_to_c_options] Root-Class [Root-Procedure]

Compile is the SmallEiffel compiler. The source code is Eiffel and the target is an executable program.

Execution of the command se-compile goes through these major steps:

  1. the command compile_to_c is called to produce various C files (*.h and *.c). In addition, Compile_to_c produces a script file and prints its name (*.make on Unix or *.BAT on DOS, for example) to standard output;
  2. The script produced at step 1 is run; this does the C compiling and the linking of object files.
Thus, se-compile is a simple wrapper to call separately the command compile_to_c, the C compiler, the linker and, sometimes, clean.

Like compile_to_c, se-compile must have at least one argument to indicate the starting execution point of the system. Thus, execution will start in Root-Procedure of Root-Class. The default Root-Procedure is make. The default <Root-Procedure> is make.

Options

All the options of command compile_to_c can be used with se-compile (they are simply passed to compile_to_c).

Examples

Example 1

When SmallEiffel is correctly installed, you can simply type the following command to test the hello world program :
se-compile hello_world
The compiler should tell you what's wrong or should compile Eiffel source files telling you the full path used to load the Eiffel source code.

Under UNIX, the executable file is named "a.out" by default.

Example 2

Type the following command to finalise the hello_world simple program :
se-compile -boost -no_split -O3 hello_world
Note that option -O3 is passed to the C compiler (see manual of gcc). Options -boost and -no_split are passed to command compile_to_c. This is usually the best way to finalise.

Only one C file is produced (option -no_split).

Example 3

To compile a big project (class PROJECT) with the C code being split up and require assertions checked :
se-compile -require_check project
The very first time, all C files are produced and compiled. Subsequently, if you type the same command after some changes in the Eiffel source files, all C files are again produced from scratch. If there are only minor changes in the generated C files, only the changed ones are passed to the C compiler (the object files are saved from one run to the next).

Bear in mind that C compiler options are not taken into account when looking for files to be recompiled. Therefore, if you now want to do :

se-compile -require_check project -O3
You must use the clean command first:
clean project
All the C files will then be recompiled using the new C option -O3. You can then be sure that the new C option will be taken into account for all the generated files.



Copyright © Dominique COLNET and Suzanne COLLIN - <colnet@loria.fr>
Last update: Wednesday June 10th, 1998





Up Top       Prev Menu      Next compile_to_c



This page was last changed for the Debian SmallEiffel package by Oliver Elphick on 29th Decmeber 1998.