A typical development cycle when working on an Ada program consists of the following steps:
The third step in particular can be tricky, because not only do the modified files have to be compiled, but any files depending on these files must also be recompiled. The dependency rules in Ada can be quite complex, especially in the presence of overloading, use clauses, generics and inlined subprograms.
`gnatmake' automatically takes care of the third and fourth steps of this process. It determines which sources need to be compiled, compiles them, and binds and links the resulting object files.
Unlike some other Ada make programs, the dependencies are always accurately recomputed from the new sources. The source based approach of the GNAT compilation model makes this possible. This means that if changes to the source program cause corresponding changes in dependencies, they will always be tracked exactly correctly by `gnatmake'.
Note that for advanced forms of project structure, we recommend creating a project file as explained in the `GNAT_Project_Manager' chapter in the `GPRbuild User’s Guide', and using the `gprbuild' tool which supports building with project files and works similarly to `gnatmake'.
|• Running gnatmake:|
|• Switches for gnatmake:|
|• Mode Switches for gnatmake:|
|• Notes on the Command Line:|
|• How gnatmake Works:|
|• Examples of gnatmake Usage:|