Next: Examples of gnatname Usage, Previous: Running gnatname, Up: Handling Arbitrary File Naming Conventions Using gnatname
gnatname
Switches for gnatname
must precede any specified Naming Pattern.
You may specify any of the following switches to gnatname
:
-c
file
-c
and
file. file may include directory information. file must be
writeable. There may be only one switch -c
. When a switch -c
is
specified, no switch -P
may be specified (see below).
-d
dir
-d
and dir. When a switch -d
is specified,
the current working directory will not be searched for source files, unless it
is explictly
specified with a -d
or -D
switch. Several switches -d
may be
specified. If dir is a relative path, it is relative to the directory of
the configuration pragmas file specified with switch -c
, or to the directory
of the project file specified with switch -P
or, if neither switch -c
nor switch -P
are specified, it is relative to the current working
directory. The directory
specified with switch -c
must exist and be readable.
-D
file
-d
and dir. file
must be an existing, readable text file. Each non empty line in file must be
a directory. Specifying switch -D
is equivalent to specifying as many switches
-d
as there are non empty lines in file.
-h
-P
proj
-P
and proj. proj may include directory information.
proj must be writeable. There may be only one switch -P
.
When a switch -P
is specified, no switch -c
may be specified.
-v
-v -v
-x
pattern
"gnatname -x "*_nt.ada" "*.ada"
will look for Ada units in all files
with the .ada extension, except those whose names end with
_nt.ada.