[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. Configuration Pragmas

In Ada 95, configuration pragmas include those pragmas described as such in the Ada 95 Reference Manual, as well as implementation-dependent pragmas that are configuration pragmas. See the individual descriptions of pragmas in the GNAT Reference Manual for details on these additional GNAT-specific configuration pragmas. Most notably, the pragma Source_File_Name, which allows specifying non-default names for source files, is a configuration pragma.

8.1 Handling of Configuration Pragmas  
8.2 The Configuration Pragmas file  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1 Handling of Configuration Pragmas

Configuration pragmas may either appear at the start of a compilation unit, in which case they apply only to that unit, or they may apply to all compilations performed in a given compilation environment.

GNAT also provides the gnatchop utility to provide an automatic way to handle configuration pragmas following the semantics for compilations (that is, files with multiple units), described in the RM. See section see section 7.2 Operating gnatchop in Compilation Mode for details. However, for most purposes, it will be more convenient to edit the `gnat.adc' file that contains configuration pragmas directly, as described in the following section.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.2 The Configuration Pragmas file

In GNAT a compilation environment is defined by the current directory at the time that a compile command is given. This current directory is searched for a file whose name is `gnat.adc'. If this file is present, it is expected to contain one or more configuration pragmas that will be applied to the current compilation.

Configuration pragmas may be entered into the `gnat.adc' file either by running gnatchop on a source file that consists only of configuration pragmas, or more conveniently by direct editing of the `gnat.adc' file, which is a standard format source file.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Tom Bennet on August, 25 2000 using texi2html