You may specify any of the following switches to
gcc'. You need to use quotes around compiler_name if
compiler_namecontains spaces or other separator characters. As an example
--GCC="foo -x -y"will instruct
foo -x -yas your compiler. Note that switch
-cis always inserted after your command name. Thus in the above example the compiler command that will be used by
foo -c -x -y. If several
--GCC=compiler_nameare used, only the last compiler_name is taken into account. However, all the additional switches are also taken into account. Thus,
--GCC="foo -x -y" --GCC="bar -z -t"is equivalent to
--GCC="bar -x -y -z -t".
gnatbind'. You need to use quotes around binder_name if binder_name contains spaces or other separator characters. As an example
--GNATBIND="bar -x -y"will instruct
bar -x -yas your binder. Binder switches that are normally appended by
gnatbind' are now appended to the end of
bar -x -y.
gnatlink'. You need to use quotes around linker_name if linker_name contains spaces or other separator characters. As an example
--GNATLINK="lan -x -y"will instruct
lan -x -yas your linker. Linker switches that are normally appended by
gnatlink' are now appended to the end of
lan -x -y.
gnatmakedoes not check these files, because the assumption is that the GNAT internal files are properly up to date, and also that any write protected ALI files have been properly installed. Note that if there is an installation problem, such that one of these files is not up to date, it will be properly caught by the binder. You may have to specify this switch if you are working on GNAT itself.
-ais also useful in conjunction with
-fif you need to recompile an entire application, including run-time files, using special configuration pragma settings, such as a non-standard
Float_Representationpragma. By default
gnatmake -acompiles all GNAT internal files with
gcc -c -gnatpgrather than
-cto do compilation and binding, but no link. Can be combined with
-lto do binding and linking. When not combined with
-call the units in the closure of the main program must have been previously compiled and must be up to date. The root unit specified by file_name may be given without extension, with the source extension or, if no GNAT Project File is specified, with the ALI file extension.
-bis also specified. Do not perform linking, except if both
-lare also specified. If the root unit specified by file_name is not a main unit, this is the default. Otherwise
gnatmakewill attempt binding and linking unless all objects are up to date and the executable is more recent than the objects.
gnatmakeis invoked with this switch, it will create a mapping file, initially populated by the project manager, if
-Pis used, otherwise initially empty. Each invocation of the compiler will add the newly accessed sources to the mapping file. This will improve the source search during the next invocation of the compiler.
-aswitch is also specified.
gnatmakecompiles all object files and ALI files into the current directory. If the
-iswitch is used, then instead object files and ALI files that already exist are overwritten in place. This means that once a large project is organized into separate directories in the desired manner, then
gnatmakewill automatically maintain and update this organization. If no ALI files are found on the Ada object path (Search Paths and the Run-Time Library (RTL)), the new object and ALI files are created in the directory containing the source being compiled. If another organization is desired, where objects and sources are kept in different directories, a useful technique is to create dummy ALI files in the desired directories. When detecting such a dummy file,
gnatmakewill be forced to recompile the corresponding source file, and it will be put the resulting object and ALI files in the directory where it found the dummy file.
gnatmakewill give you the full ordered list of failing compiles at the end). If this is problematic, rerun the make process with n set to 1 to get a clean list of messages.
gnatmake is invoked with several file_names and with this
switch, if there are compilation errors when building an executable,
gnatmake will not attempt to build the following executables.
-bto binding and linking. Linking will not be performed if combined with
-cbut not with
-b. When not combined with
-ball the units in the closure of the main program must have been previously compiled and must be up to date, and the main program need to have been bound. The root unit specified by file_name may be given without extension, with the source extension or, if no GNAT Project File is specified, with the ALI file extension.
gnatmakeignores time stamp differences when the only modifications to a source file consist in adding/removing comments, empty lines, spaces or tabs. This means that if you have changed the comments in a source file or have simply reformatted it, using this switch will tell gnatmake not to recompile files that depend on it (provided other sources on which these files depend have undergone no semantic modifications). Note that the debugging information may be out of date with respect to the sources if the
-mswitch causes a compilation to be switched, so the use of this switch represents a trade-off between compilation time and accurate debugging information.
-Iswitches. If you use
-q(see below), only the source file names, without relative paths, are output. If you just specify the
-Mswitch, dependencies of the GNAT internal system files are omitted. This is typically what you want. If you also specify the
-aswitch, dependencies of the GNAT internal files are also listed. Note that dependencies of the objects in external Ada libraries (see switch
-aLdir in the following list) are never reported.
-oswitch is omitted the default name for the executable will be the name of the input file in appropriate form for an executable file on the host system.
This switch cannot be used when invoking
gnatmake with several
-O -O2is different than
-O2 -O, but
-g -Ois equivalent to
gnatmakedecides are necessary.
-gor any uppercase switch (other than
-S) or any switch that is more than one character is passed to
-O, -gnato, etc.)
Source and library search path switches:
gnatmaketo skip compilation units whose .ali files have been located in directory dir. This allows you to have missing bodies for the units in dir and to ignore out of date bodies for the same units. You still need to specify the location of the specs for these units by using the switches
-Idir. Note: this switch is provided for compatibility with previous versions of
gnatmake. The easier method of causing standard libraries to be excluded from consideration is to write-protect the corresponding ALI files.
The selected path is handled like a normal RTS path.