Node: Running gnatname, 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_patterns]
All of the arguments are optional.
When used with no arguments, gnatname
will create a file gnat.adc
in the current working directory, that contains configuration pragmas for all
compilation units in the current directory. To find all compilation units,
gnatname
will use the GNAT compiler in syntax-check-only mode on all
regular files. For those files that contain an Ada compilation unit,
a pragma Source_File_Name
will be generated.
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).
Specifying no Naming Pattern is equivalent to specifying the single Naming Pattern
"*"
.