Next: Switches for gnatname, Previous: Arbitrary File Naming Conventions, Up: Handling Arbitrary File Naming Conventions Using gnatname
gnatname
The usual form of the gnatname
command is
$ gnatname [switches] naming_pattern [naming_patterns]
All of the arguments are optional. If invoked without any argument,
gnatname
will display its usage.
When used with at least one naming pattern, gnatname
will attempt to
find all the compilation units in files that follow at least one of the
naming patterns. To find these compilation units,
gnatname
will use the GNAT compiler in syntax-check-only mode on all
regular files.
One or several Naming Patterns may be given as arguments to gnatname
.
Each Naming Pattern is enclosed between double quotes.
A Naming Pattern is a regular expression similar to the wildcard patterns
used in file names by the Unix shells or the DOS prompt.
Examples of Naming Patterns are
"*.[12].ada" "*.ad[sb]*" "body_*" "spec_*"
For a more complete description of the syntax of Naming Patterns, see the second kind of regular expressions described in g-regexp.ads (the "Glob" regular expressions).
When invoked with no switches, gnatname
will create a configuration
pragmas file gnat.adc in the current working directory, with pragmas
Source_File_Name
for each file that contains a valid Ada unit.