25.1 Running gnatstub
gnatstub has the command-line interface of the form
$ gnatstub [switches] filename [directory] [-cargs gcc_switches]
where
- filename
- is the name of the source file that contains a library unit declaration
for which a body must be created. The file name may contain the path
information.
The file name does not have to follow the GNAT file name conventions. If the
name
does not follow GNAT file naming conventions, the name of the body file must
be provided
explicitly as the value of the -obody-name option.
If the file name follows the GNAT file naming
conventions and the name of the body file is not provided,
gnatstub
creates the name
of the body file from the argument file name by replacing the .ads
suffix
with the .adb suffix.
- directory
- indicates the directory in which the body stub is to be placed (the default
is the
current directory)
- `gcc_switches' is a list of switches for
- gcc. They will be passed on to all compiler invocations made by
gnatelim to generate the ASIS trees. Here you can provide
-I switches to form the source search path,
use the -gnatec switch to set the configuration file,
use the -gnat05 switch if sources should be compiled in
Ada 2005 mode etc.
- switches
- is an optional sequence of switches as described in the next section