Compilation operations
Generating the makefile
There are two different methods of generating the makefile on a package or a class:
·
through the
"Generate" icon in the
toolbar on a component or its makefile work product (Figure 43)
· through the "C# Developer/Generate the makefile" command, available in the context menu accessed by right-clicking on a makefile work product belonging to a component

Figure 43. Generating the makefile using the "Generate" icon in the toolbar
Steps:
1.
In the explorer, select the component
for which you wish to generate the makefile.
2.
Click on the
"Generate" icon in the
toolbar. If no makefile work product already
exists for the selected component, this is automatically created.
Visualizing the makefile
There are two different methods of visualizing the makefile:
·
through the
"Visualize" icon in the
toolbar on a component for which the makefile has been generated, or on the
makefile work product of a component for which the makefile has been generated
· through the "C# Developer/Visualize the makefile" command, available in the context menu accessed by right-clicking on a makefile work product belonging to a component (Figure 44)

Figure 44. Visualizing the makefile through the "C# Developer/Visualize the makefile" command
Steps:
1.
Right-click on the C# makefile
work product belonging to the component whose generated makefile you wish to
visualize.
2. In the context menu which then appears, run the "C# Developer/Visualize the makefile" command.
A window like the one shown in Figure 45 then appears.

Figure 45. The "Visualizing the generated file" window
Compiling
There are two different methods of
running the compilation operation:
·
through the
"Compile" icon in the toolbar
on a component or its makefile work product
· through the "C# Developer/Compile" command, available in the context menu which is accessed by right-clicking on the component or its makefile work product (Figure 46)

Figure 46. Launching compilation through the "C# Developer/Compile" command
Steps:
1.
Right-click on the C# makefile
work product belonging to the component you want to compile.
2.
In the context menu which then
appears, run the "C# DeveloperCompile" command.
The compilation analysis window then appears, providing information on the
compilation, including any errors encountered.
Recompiling
You may wish to recompile all previously compiled files. To do this, you should simply run the "C# Developer/Recompile all" command, available in the context menu accessed by right-clicking on the component's makefile work product.
Clearing compiled files
To delete all compiled files, you should simply run the "C# Developer/Clear compiled files" command, available in the context menu accessed by right-clicking on the component's makefile work product.
Generating and compiling
There are two different methods of
launching the generation and compilation commands one after the other:
·
through the
"Generate all and compile"
icon in the toolbar on a component or its makefile work product (Figure 47)
· through the "C# Developer/Generate and compile" command, available in the context menu which is accessed by right-clicking on the makefile work product of a component

Figure 47. Launching generation and immediate subsequent compilation from the tooblbar
Steps:
1.
In the explorer, select the
component for which you wish to run the generation and compilation operations.
2.
Click on the
"Generate all and compile"
icon in the toolbar. If no makefile work product exists for the selected
component, this is automatically created.
After running this command, the "Compilation analysis" window
then appears, providing information on the compilation, including any errors
encountered.
Analyzing the compilation
After running both the "Compile" and "Generate all and compile" commands, the compilation analysis window automatically appears (Figure 48).

Figure 48. The "Compilation analysis" window
This window is divided into two
sections:
·
The upper section displays the
generated sources which present errors. Double-clicking on the blue text opens
the dialog box of the model element concerned.
·
The lower section, entitled
"Results of the compilation", displays errors prefixed by the
icon. Other lines are prefixed either with the
(information)
icon or the
warning)
icon. When selecting a line of errors, the file containing the faulty code is
displayed in the upper section of the window. Double-clicking on this code
edits the model element that generated the code.