Difference between revisions of "Compile"

From Liberty Eiffel Wiki
Jump to: navigation, search
m (s/LibertyEiffel/Liberty Eiffel/)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
  +
[[Category:Tool]]
[http://washingtonmutuag.fiberia.com | Washington Mutual Mortgage]
 
  +
[http://secondomemort.fiberia.com | Second Home Mortgage]
 
  +
<TT>compile</TT> is the most important tool because it is '''the''' Liberty Eiffel compiler.
[http://secondmortgaget.fiberia.com | Second Mortgage And Home Equity Loan]
 
  +
In a normal installation, it is invoked by the command <b><TT>[[se]]&nbsp;c</TT></b>.
[http://secondmortgages.fiberia.com | Second Mortgage]
 
  +
[http://secondmortgager.fiberia.com | Second Mortgage Bad Credit]
 
  +
There are two ways of invoking it: the ''traditional'' mode and the ''ACE'' mode.
[http://secondmortgaged.fiberia.com | Second Mortgage Lender]
 
  +
* In the traditional mode, many options can be specified on the command line.
[http://refinancemortgaw.fiberia.com | Refinance Mortgage Loan]
 
  +
* In the [[ACE]] mode ''(Assembly of Classes in Eiffel)'', most of its options are not allowed on the
[http://refinancemortga7.fiberia.com | Refinance Mortgage Rate]
 
  +
command line; they have their equivalents ''in'' the ACE file.
[http://refinancemortga2.fiberia.com | Refinance Mortgage Interest Rate]
 
  +
[http://refinancehomemtg.fiberia.com | Refinance Home Mortgage Interest Rate]
 
  +
== Synopsis ==
[http://refinancehomem.fiberia.com | Refinance Home Mortgage Rate]
 
  +
[http://refinance2ndmo.fiberia.com | Refinance 2nd Mortgage]
 
  +
* <code>se c [common_options] [c2c_options] &lt;root_class&gt; [&lt;root_procedure&gt;]</code>
[http://onlinemortgageyt.fiberia.com | Online Mortgage Advice]
 
  +
* <code>se c [common_options] &lt;ace_file.ace&gt;</code>
[http://onlinemortgage1.fiberia.com | Online Mortgage Application]
 
  +
[http://ohiomortgage.fiberia.com | Ohio Mortgage]
 
  +
The first syntax is the traditional mode, the second is the ACE mode.
[http://newjerseymortg.fiberia.com | New Jersey Mortgage Loan]
 
  +
[http://ndmortgageref21.fiberia.com | 2nd Mortgage Refinance]
 
  +
In the ACE mode, the name of the [[ACE]] file provided must end with the suffix <TT>.ace</TT>.
[http://ndmortgageratge.fiberia.com | 2nd Mortgage Rate]
 
  +
[http://ndmortgageloan2.fiberia.com | 2nd Mortgage Loan]
 
  +
The <TT>compile</TT> command runs through several stages:
[http://ndmortgage2.fiberia.com | 2nd Mortgage]
 
  +
# the <TT>[[compile_to_c]]</TT> command is called to produce the C files (<TT>*.h</TT> and <TT>*.c</TT>).
[http://ndloanmortgag2.fiberia.com | 2nd Loan Mortgage]
 
  +
A script file is also created, whose name depends on the application.
[http://ndhomemortg2ag.fiberia.com | 2nd Home Mortgage]
 
  +
# this script is executed line by line; normally, it call the C compiler for each <TT>.c</TT> file, then it finishes with the link phase.
[http://nationalcitymota.fiberia.com | National City Mortgage]
 
  +
# if the <TT>-clean</TT> option is used, the <TT>[[clean]]</TT> command is called.
[http://mortgagesecond6.fiberia.com | Mortgage Second]
 
  +
[http://mortgagesanjosqs.fiberia.com | Mortgage San Jose California]
 
  +
Like <TT>[[compile_to_c]]</TT>, <TT>compile</TT> must have at least one argument which gives the program's
[http://mortgageresident.fiberia.com | Mortgage Residential]
 
  +
starting point, which is, in fact, the creation of a class. In the ACE mode, this information is given by
[http://mortgagerefinanw.fiberia.com | Mortgage Refinance Second]
 
  +
parameters in the ACE file.
[http://mortgagerefinanq.fiberia.com | Mortgage Refinance California]
 
  +
In the traditional mode, you have to give at least the class name: by default the creation feature is called <TT>make</TT>, and this must exist; otherwise, it is necessary to specify the creation feature.
[http://mortgagerefinan7.fiberia.com | Mortgage Refinancing Company]
 
  +
[http://mortgagerateregs.fiberia.com | Mortgage Rate Refinance]
 
  +
In all cases, the creation feature must be a feature ''with no arguments''.
[http://mortgagepennsyl.fiberia.com | Mortgage Pennsylvania Refinance]
 
  +
[http://mortgageohio.fiberia.com | Mortgage Ohio]
 
  +
=== Common options ===
[http://mortgageloanrate.fiberia.com | Mortgage Loan Rate]
 
  +
[http://mortgageloanpra.fiberia.com | Mortgage Loan Processor]
 
  +
{| cellspacing="4" cellpadding="0" width="100%"
[http://mortgageloane3.fiberia.com | Mortgage Loan Refinance And Debt Consolidation]
 
  +
|-
[http://mortgageloan.fiberia.com | Mortgage Loan]
 
  +
| width="20%" valign="top" | <code>-clean</code>
[http://mortgagelifein12.fiberia.com | Mortgage Life Insurance]
 
  +
| By default, the generated C files are kept from one execution to the next. This allows incremental compilation, since only the files changed since the last invocation of <TT>compile</TT> are regenerated.
[http://mortgageinsurani.fiberia.com | Mortgage Insurance Quote]
 
  +
[http://mortgagebrokerr.fiberia.com | Mortgage Broker In California]
 
  +
Since the Eiffel compilation is usually much faster than the C compilation, this usually saves a lot of time.
[http://mortgageapplicat.fiberia.com | Mortgage Application]
 
  +
[http://lowmortgagerate.fiberia.com | Low Mortgage Rate Refinance]
 
  +
However, there are situations when one wants to remove all the old generation of files, so as to start from scratch.
[http://loanmortgagereg.fiberia.com | Loan Mortgage Refinance]
 
  +
[http://loanmortgage.fiberia.com | Loan Mortgage]
 
  +
The <TT>-clean</TT> option deletes the C files, the object files and several other generated files, by invoking the <TT>[[clean]]</TT> command at the end of the compilation.
[http://interestmortgagt.fiberia.com | Interest Mortgage Rate Refinance]
 
  +
|-
[http://interestmortgag3.fiberia.com | Interest Mortgage Rate]
 
  +
| valign="top" | <code>-help</code>
[http://interestmortgag.fiberia.com | Interest Mortgage]
 
  +
| Display a short summary of the command line syntax,as well as a complete list of the compiler's options.
[http://insurancemortga.fiberia.com | Insurance Mortgage]
 
  +
|-
[http://insurancelifem32.fiberia.com | Insurance Life Mortgage]
 
  +
| valign="top" | <code>-verbose</code>
[http://insurance2mortga.fiberia.com | Insurance Mortgage Quote]
 
  +
| Display (an enormous amount of) information during the compilation: a complete list of files loaded, the [[type inference]] scores, the generated files, and so on.
[http://illinoismortgagt.fiberia.com | Illinois Mortgage Rate]
 
  +
|-
[http://hommortgagera1.fiberia.com | Home Mortgage Rate Refinance]
 
  +
| valign="top" | <code>-version</code>
[http://homemortgagera.fiberia.com | Home Mortgage Rate]
 
  +
| Display the Liberty Eiffel version number.
[http://homemortgagelo.fiberia.com | Home Mortgage Loan Rate]
 
  +
|}
[http://homemortgagein2.fiberia.com | Home Mortgage Insurance]
 
  +
[http://homeloanmortgag.fiberia.com | Home Loan Mortgage Refinance]
 
  +
=== c2c options ===
[http://homeloanmortga1.fiberia.com | Home Loan Mortgage Rate]
 
  +
[http://homeloanmortga.fiberia.com | Home Loan Mortgage Second]
 
  +
These options are passed directly to <TT>[[compile_to_c]]</TT>. See that command for details.
[http://homeinterest1mo.fiberia.com | Home Interest Mortgage Rate Refinance]
 
  +
[http://homeinsurancemo.fiberia.com | Home Insurance Mortgage]
 
  +
=== Examples of using traditional mode ===
[http://homeequitymort1.fiberia.com | Home Equity Mortgage]
 
  +
[http://homeequitymort.fiberia.com | Home Equity Mortgage Loan]
 
  +
==== Example 1 ====
[http://gmacmortgage.fiberia.com | Gmac Mortgage]
 
  +
[http://floridarefinanc4.fiberia.com | Florida Refinance Mortgage]
 
  +
When Liberty Eiffel is installed correctly, you can run the following command to test compile the notorious ''Hello world'' program:
[http://floridamortgagew.fiberia.com | Florida Mortgage Company]
 
  +
[http://floridamortgagea.fiberia.com | Florida Mortgage Refinance]
 
  +
se c hello_world
[http://floridamortgage7.fiberia.com | Florida Mortgage Lender]
 
  +
[http://floridamortgage4.fiberia.com | Florida Mortgage]
 
  +
In this mode, by default, the compiler is very silent; to see more detail, enter
[http://floridainmortgee.fiberia.com | Florida In Mortgage Refinance]
 
  +
[http://fixedratemortg12.fiberia.com | Fixed Rate Mortgage]
 
  +
se c -verbose hello_world
[http://fixedmortgagerat.fiberia.com | Fixed Mortgage Rate]
 
  +
[http://fixedmortgag30.fiberia.com | 30 Fixed Mortgage Rate Year]
 
  +
and suddenly Liberty Eiffel becomes ''very'' chatty! It just has to tell you about every file used and every file written.
[http://fhamortgage.fiberia.com | Fha Mortgage]
 
  +
[http://ditechmortgage32.fiberia.com | Ditech Mortgage Loan]
 
  +
An executable program is generated (normally <TT>a.out</TT> under UNIX, <TT>a.exe</TT> under Windows) which can be run directly.
[http://ditechloanmort.fiberia.com | Ditech Loan Mortgage]
 
  +
[http://debtconsolidati1.fiberia.com | Debt Consolidation Mortgage Loan]
 
  +
==== Example 2 ====
[http://dailymortgagerq.fiberia.com | Daily Mortgage Rate]
 
  +
[http://currentmortgage3.fiberia.com | Current Mortgage Rate]
 
  +
Enter the following command to create a finalised version of our ''Hello world'':
[http://currentinterestq.fiberia.com | Current Interest Mortgage Rate]
 
  +
[http://currenmortgaget.fiberia.com | Current Mortgage Interest Rate]
 
  +
se c -boost -c_mode release hello_world
[http://countrywidemorta.fiberia.com | Countrywide Mortgage]
 
  +
[http://consolidationdet.fiberia.com | Consolidation Debt Loan Mortgage]
 
  +
These options are passed to <TT>[[compile_to_c]]</TT>. This is usually the best way to finalise a program. Note that using [[Configuration_file#C_modes|C mode]] commonly implies the <TT>-no_split</TT> option, as well as passing the <TT>-O3</TT> option to the C compiler.
[http://consolidationde.fiberia.com | Consolidation Debt Loan Mortgage Refinance]
 
  +
[http://connecticutmortg.fiberia.com | Connecticut Mortgage Refinance]
 
  +
==== Example 3 ====
[http://companymortgage1.fiberia.com | Company Mortgage Refinance]
 
  +
[http://companyflorida4.fiberia.com | Company Florida Mortgage]
 
  +
To compile a large project (e.g. the class <TT>PROJECT</TT>) with incremental compilation and checking preconditions:
[http://coloradomortgag5.fiberia.com | Colorado Mortgage Loan]
 
  +
[http://coloradocompany.fiberia.com | Colorado Company Home Loan Mortgage]
 
  +
se c -require_check project
[http://citymortgagenas.fiberia.com | City Mortgage National]
 
  +
[http://chasemanhattan3.fiberia.com | Chase Manhattan Mortgage]
 
  +
The very first time, all the C files are produced and compiled. Subsequently, if you use the same command after changing some Eiffel files, only the changed C files will be recompiled.
[http://californiamortgf.fiberia.com | California Mortgage Refinance]
 
  +
[http://californiamortge.fiberia.com | California Mortgage]
 
  +
Note that extensive modifications of the source can force the recompilation of the whole project.
[http://californiamortg3.fiberia.com | California Mortgage Broker]
 
  +
[http://californiamortg.fiberia.com | California Mortgage Rate]
 
  +
Again, changing the compilation options also involves recompiling the whole set of generated C files.
[http://californialoanca.fiberia.com | California Loan Mortgage]
 
[http://calculatormortge.fiberia.com | Calculator Mortgage]
 
[http://broker1californi.fiberia.com | Broker California Mortgage]
 
[http://bestrefinanceqh.fiberia.com | Equity Home Loan Mortgage Second]
 
[http://bestrefinanceqh.fiberia.com | Best Refinance Home Mortgage Loan Rate]
 
[http://bestrefinancem12.fiberia.com | Best Refinance Mortgage Rate]
 
[http://bestmortgagerate.fiberia.com | Best Mortgage Rate]
 
[http://bestmortgagerat.fiberia.com | Best Mortgage Rate Refinance]
 
[http://bestmortgagelows.fiberia.com | Best Mortgage Loan]
 
[http://bestloanmortga.fiberia.com | Best Loan Mortgage]
 
[http://besthome2loanm.fiberia.com | Best Home Loan Mortgage Rate Refinance]
 
[http://badcreditmortggt.fiberia.com | Bad Credit Mortgage Second]
 
[http://badcreditmortge.fiberia.com | Bad Credit Mortgage Lender]
 
[http://badcreditloaba.fiberia.com | Bad Credit Loan Mortgage]
 
[http://badcredithomeqw.fiberia.com | Bad Credit Home Loan Mortgage]
 
[http://badcredithomegt.fiberia.com | Bad Credit Home Mortgage Loan]
 
[http://badcredithomeg1.fiberia.com | Bad Credit Home Mortgage]
 
[http://badcredit1mortg.fiberia.com | Bad Credit Mortgage Memphis]
 
[http://arizonamortgageq.fiberia.com | Arizona Mortgage Rate]
 
[http://arizonamortgage1.fiberia.com | Arizona Mortgage Lender]
 
[http://arizonamortgage.fiberia.com | Arizona Mortgage Loan]
 
[http://arizonaloanmorw.fiberia.com | Arizona Loan Mortgage]
 
[http://applicationmorte.fiberia.com | Application Mortgage]
 
[http://applicationmort1.fiberia.com | Application Mortgage Online]
 
[http://advicemortgagew.fiberia.com | Advice Mortgage Online]
 
[http://adjustablerateqw.fiberia.com | Adjustable Rate Mortgage]
 
[http://adjustablemortga.fiberia.com | Adjustable Mortgage Rate]
 

Latest revision as of 13:06, 8 June 2016


compile is the most important tool because it is the Liberty Eiffel compiler. In a normal installation, it is invoked by the command se c.

There are two ways of invoking it: the traditional mode and the ACE mode.

  • In the traditional mode, many options can be specified on the command line.
  • In the ACE mode (Assembly of Classes in Eiffel), most of its options are not allowed on the

command line; they have their equivalents in the ACE file.

Synopsis

  • se c [common_options] [c2c_options] <root_class> [<root_procedure>]
  • se c [common_options] <ace_file.ace>

The first syntax is the traditional mode, the second is the ACE mode.

In the ACE mode, the name of the ACE file provided must end with the suffix .ace.

The compile command runs through several stages:

  1. the compile_to_c command is called to produce the C files (*.h and *.c).

A script file is also created, whose name depends on the application.

  1. this script is executed line by line; normally, it call the C compiler for each .c file, then it finishes with the link phase.
  2. if the -clean option is used, the clean command is called.

Like compile_to_c, compile must have at least one argument which gives the program's starting point, which is, in fact, the creation of a class. In the ACE mode, this information is given by parameters in the ACE file. In the traditional mode, you have to give at least the class name: by default the creation feature is called make, and this must exist; otherwise, it is necessary to specify the creation feature.

In all cases, the creation feature must be a feature with no arguments.

Common options

-clean By default, the generated C files are kept from one execution to the next. This allows incremental compilation, since only the files changed since the last invocation of compile are regenerated.

Since the Eiffel compilation is usually much faster than the C compilation, this usually saves a lot of time.

However, there are situations when one wants to remove all the old generation of files, so as to start from scratch.

The -clean option deletes the C files, the object files and several other generated files, by invoking the clean command at the end of the compilation.

-help Display a short summary of the command line syntax,as well as a complete list of the compiler's options.
-verbose Display (an enormous amount of) information during the compilation: a complete list of files loaded, the type inference scores, the generated files, and so on.
-version Display the Liberty Eiffel version number.

c2c options

These options are passed directly to compile_to_c. See that command for details.

Examples of using traditional mode

Example 1

When Liberty Eiffel is installed correctly, you can run the following command to test compile the notorious Hello world program:

se c hello_world

In this mode, by default, the compiler is very silent; to see more detail, enter

se c -verbose hello_world

and suddenly Liberty Eiffel becomes very chatty! It just has to tell you about every file used and every file written.

An executable program is generated (normally a.out under UNIX, a.exe under Windows) which can be run directly.

Example 2

Enter the following command to create a finalised version of our Hello world:

se c -boost -c_mode release hello_world

These options are passed to compile_to_c. This is usually the best way to finalise a program. Note that using C mode commonly implies the -no_split option, as well as passing the -O3 option to the C compiler.

Example 3

To compile a large project (e.g. the class PROJECT) with incremental compilation and checking preconditions:

se c -require_check project

The very first time, all the C files are produced and compiled. Subsequently, if you use the same command after changing some Eiffel files, only the changed C files will be recompiled.

Note that extensive modifications of the source can force the recompilation of the whole project.

Again, changing the compilation options also involves recompiling the whole set of generated C files.