mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-02-01 06:24:55 +01:00
Author:halw Date:2011-02-24T13:02:10.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@788 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
257 lines
7.4 KiB
Plaintext
257 lines
7.4 KiB
Plaintext
[[Property:title|EiffelStudio: Using command line options]]
|
|
[[Property:link_title|Using command line options]]
|
|
[[Property:weight|1]]
|
|
[[Property:uuid|a6b6a676-8660-ce2d-6f37-03de7f23a78e]]
|
|
==Compiling and viewing==
|
|
|
|
The Eiffel Compiler line mode command '''ec''' has many options, as you can see from the tables below. It may be helpful to think of any one '''ec''' command as either a command to compile or a command to view software text.
|
|
|
|
|
|
===Commands for compiling===
|
|
|
|
The simplest compiling command you can enter is:
|
|
|
|
<code lang="text">
|
|
ec
|
|
</code>
|
|
|
|
The command does not include any of the ''Compiling options'' shown below, so the default option "-melt" is used. The "-config" is omitted, so '''ec''' will try to find a configuration file named <code lang="text">Ace.ecf</code> in the current directory.
|
|
|
|
The command:
|
|
|
|
<code lang="text">
|
|
ec -config my_config_file.ecf
|
|
</code>
|
|
|
|
melts the system having the configuration file in the current directory <code lang="text">my_config_file.ecf</code> .
|
|
|
|
To freeze or finalize that system, you would just include the appropriate ''Compiling option'':
|
|
|
|
<code lang="text">
|
|
ec -freeze -config my_config_file.ecf
|
|
</code>
|
|
|
|
You can specify the name of a file which contains the root class of a system in the current directory:
|
|
|
|
<code lang="text">
|
|
ec application.e
|
|
</code>
|
|
|
|
This command will compile a system with the class in <code>application.e</code> as its root. If there is no configuration file named <code>application.ecf</code> in the current directory, then '''ec''' will create one. It will also use any classes in the current working directory and by default the library EiffelBase.
|
|
|
|
|
|
{{tip|This "configuration-less" form of compilation is convenient to use for a quick compile. But you should understand that because it does create a configuration file with default names for the configuration file itself, the project, and the root cluster, using it against a root class file in a folder in which a configuration file with another name already exists could lead to confusion. }}
|
|
|
|
|
|
You can add additional libraries to the configuration by using the "-library" option and specifying either the short name of one of the EiffelStudio libraries or a path to a library configuration file. To include EiffelTime in the compilation of <code>application.e</code>, you could use this command:
|
|
|
|
<code lang="text">
|
|
ec application.e -library time
|
|
</code>
|
|
|
|
This immediately adds the EiffelTime library to the configuration file <code>application.ecf</code>, so if you compile again, it is not necessary to respecify the library.
|
|
|
|
|
|
===Commands for viewing===
|
|
|
|
By selecting certain options on the '''ec''' command, you can generate advanced views of your software much like those provided by EiffelStudio. In the table below you will see the set of ''Viewing options''. These options take arguments that are either a class name or a class name and feature name. The following examples will give you an idea of how to use the ''Viewing options''.
|
|
|
|
To see the "flat" form of class <code>APPLICATION</code> in the example used above:
|
|
|
|
<code>
|
|
ec -flat application -config application.ecf
|
|
</code>
|
|
|
|
To save the output, add the "-file" option with a file name:
|
|
|
|
<code>
|
|
ec -flat application -config application.ecf -file application_flat_form.txt
|
|
</code>
|
|
|
|
Feature-oriented options, like "-implementers", take a class name and feature name:
|
|
|
|
<code>
|
|
ec -implementers application some_feature -config application.ecf
|
|
</code>
|
|
|
|
|
|
===Command options===
|
|
|
|
The table below lists the available ''options'', the arguments they require, and their effect:
|
|
|
|
|
|
{| border="1"
|
|
|-
|
|
| width="175pt" | '''OPTION'''
|
|
| '''ARGUMENTS'''
|
|
| '''EFFECT'''
|
|
|-
|
|
| ''Compiling options''
|
|
|-
|
|
| -melt
|
|
|
|
|
| [[Melting Ice Technology#Melting|Melt]] compilation. This is the default option, if no other compiling or viewing option is specified.
|
|
|-
|
|
| -freeze
|
|
|
|
|
| [[Melting Ice Technology#Freezing|Freeze]] system.
|
|
|-
|
|
| -finalize
|
|
|
|
|
| [[Melting Ice Technology#Finalizing|Finalize]] system. See note below.
|
|
|-
|
|
| -precompile
|
|
|
|
|
| [[Melting Ice Technology#Precompiling|Precompile]] system, treating it as a library.
|
|
|-
|
|
| ''Viewing options''
|
|
|-
|
|
| -ancestors
|
|
| class_name
|
|
| Print the ancestors of the class.
|
|
|-
|
|
| -aversions
|
|
| class_name, feature_name
|
|
| Print the ancestor versions of the feature.
|
|
|-
|
|
| -callers
|
|
| class_name, feature_name
|
|
| Print all the routines that call the feature.
|
|
|-
|
|
| -clients
|
|
| class_name
|
|
| Print the clients of the class
|
|
|-
|
|
| -descendants
|
|
| class_name
|
|
| Print the descendants of the class.
|
|
|-
|
|
| -dversions
|
|
| class_name, feature_name
|
|
| Print all the versions of the feature in the descendant versions of the class.
|
|
|-
|
|
| -flat
|
|
| class_name
|
|
| Print the flat view of the class.
|
|
|-
|
|
| -flatshort
|
|
| class_name
|
|
| Print the Flat Contract view (previously called flat-short form) of the class.
|
|
|-
|
|
| -implementers
|
|
| class_name, feature_name
|
|
| Print all the classes that declare or redeclare the feature.
|
|
|-
|
|
| -short
|
|
| class_name
|
|
| Print the Contract view (previously called short form) of the class.
|
|
|-
|
|
| -suppliers
|
|
| class_name
|
|
| Print all the suppliers of the class.
|
|
|-
|
|
| ''Other options''
|
|
|-
|
|
| -batch
|
|
|
|
|
| Launch the compilation without user request.
|
|
|-
|
|
| -clean
|
|
|
|
|
| Delete project if already compiled and compile project as if it was the first time.
|
|
|-
|
|
| -config
|
|
| file_name
|
|
| Use the file as configuration.
|
|
|-
|
|
| -c_compile
|
|
|
|
|
| Launch C compilation, if needed, after Eiffel compilation.
|
|
|-
|
|
| -file
|
|
| file_name
|
|
| Save the output to the file.
|
|
|-
|
|
| -filter
|
|
| filter_file_name
|
|
| Print text as processed by the filter.
|
|
|-
|
|
| -help
|
|
|
|
|
| Print the help.
|
|
|-
|
|
| -keep
|
|
|
|
|
| Keep assertions in final mode. Useful with -finalize only.
|
|
|-
|
|
| -library
|
|
| library_name
|
|
| Library is included in the configuration when a file name for the root class is given.
|
|
|-
|
|
| -loop
|
|
|
|
|
| Enter interactive mode. See: [[Command line interactive mode]].
|
|
|-
|
|
| -metadata_cache_path
|
|
| directory_name
|
|
| Specify location of Metadata Cache used for .NET compilation. This overrides any settings from your configuration file.
|
|
|-
|
|
| -no_library
|
|
|
|
|
| When converting an old configuration file format, do not convert clusters into libraries.
|
|
|-
|
|
| -project_path
|
|
| directory_name
|
|
| Use this directory as compilation directory. (Default: current directory.)
|
|
|-
|
|
| -stop
|
|
|
|
|
| Stop on errors. (Default: no.)
|
|
|-
|
|
| -use_settings
|
|
|
|
|
| Use the project global settings to retrieve the project location for the last compilation of this project.
|
|
|-
|
|
| -version
|
|
|
|
|
| Print compiler version number.
|
|
|}
|
|
|
|
|
|
{{note|In the third column, to '''print''' means to produce the requested information on the default output of the '''ec''' command.}}
|
|
|
|
|
|
{{note|When using '''-finalize''', assertions will be discarded (unlike in EiffelStudio which asks first.) The assertion disposition specified in the project configuration file can be retained in finalization by combining the '''-keep''' option with '''-finalize'''.}}
|
|
|
|
|
|
Some options can have modifiers that can affect their results. The modifiers are listed in the table below:
|
|
{| border="1"
|
|
|-
|
|
| <center>'''Option'''</center>
|
|
| <center>'''Modifier'''</center>
|
|
| <center>'''Effect'''</center>
|
|
|-
|
|
| -callers
|
|
! colspan="2" |
|
|
|-
|
|
|
|
|
| -show_all
|
|
| Include all callers rather than only those in the specified class.
|
|
|-
|
|
|
|
|
| -assigners
|
|
| Restrict callers to those that use given feature only as a target of an assignment instruction.
|
|
|-
|
|
|
|
|
| -creators
|
|
| Restrict callers to those that use given feature only as a target of a creation instruction.
|
|
|}
|
|
|
|
|
|
{{seealso|<br/>
|
|
[[Batch compilation|Batch compilation]] }}
|
|
|
|
|
|
|
|
|