Ada Link File Generator - attolalk

Purpose

The Ada Link File Generator (attolalk) feature automatically generates link files. It uses file name extensions that you allow or disallow, and on the file list found in the specified directories.

Syntax

attolalk [<options>] <link file name> <directory> [<directory> ... <directory>]

where:

  • <link file name> is the name of the generated link file. If attolalk cannot write this file a fatal error is generated.

    <directory> is a directory name. If attolalk cannot read file from this directory, a fatal error is generated.

    <options> is a set of optional command line parameters as specified in the following section.

Description

The Link File Generator requires that the LD_LIBRARY_PATH environment variable is set to the /lib directory in the product installation directory.

File Extensions

A file extension is a character string of unconstrained positive length (greater than zero). A file name matches an extension if its length is greater than the length of extension, and if the N last characters of the file name are identical to the characters of the extension (N is the length of the extension). For example, source.ada matches the .ada extension but not .1.ada extension.

Permitted and Forbidden Extensions:

Permitted and forbidden file extensions for the Link File Generator are specified by the ATTOLALK_EXT and ATTOLALK_NOEXT environment variables and are separated by the ':' character on UNIX systems and ';' on Windows.

Example, on UNIX:

ATTOLALK_EXT=".ada:.a:.am"

ATTOLALK_NOEXT=".1.ada"

Example, on Windows:

ATTOLALK_EXT=".ad6;.adc;.ads;.adb"

By default, the allowed extension list is ".ada:.ads:.adb" and the forbidden extension list is empty. These default values are orverwritten by the value of the ATTOLALK_EXT variable.

Link File Generation

For each given directory, the contained file name list is loaded. Each file name is compared with the allowed extensions. If a match is found, the file name is compared with forbidden extension. If there is no match, the file is taken as an Ada source file. Each Ada source file is analyzed and may produce one or more lines in the generated link file (with the syntax described above).

Command Line Parameters

Options can be in any order. They may be upper or lowercase and can be abbreviated to their shortest unambiguous number of characters.

-r

Relative paths. With the -r option, all filenames are generated with relative paths.

-s

Silent mode. With the -s option, only errors are displayed.

-f

Force all Ada files. By default, the Link File Generator only analyzes Ada source files that were changed since the last analysis. Use the -f option to force the analysis of all Ada source files, regardless of when they were modified.

Return Codes

After execution, the program exits with the following return codes

Code Description
0 End of execution with no errors
3 End of execution with one or more warning messages
5 End of execution with one or more errors
7 End of execution because of fatal error
9 End of execution because of internal error

All messages are sent to the standard error output device.

Related Topics

Environment Variables | Ada Unit Maker | Ada Instrumentor