PowerAda asrcdep

From OC Systems Wiki!
< PowerAda:APPENDIX E. Tools Reference
Revision as of 00:35, 25 April 2019 by imported>WikiVisor (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


NAME

asrcdep - analyze source dependencies

SYNOPSIS

asrcdep [-h] [-v] [-c] [-m] [-F | [-g] [-i]] 
        [-u UnitName] {-I | FileName ...}

DESCRIPTION

This command determines, from a given list of Ada source files, a reasonable compilation order for those files. The source is analyzed to determine the dependencies created by context clauses.

OPTIONS

-h
Requests help for the command. If it is specified, all other options and parameters (except erroneous ones) are ignored.
-v
Causes asrcdep to display progress messages. For instance, a message every ten files indicates how many files in total have been processed.
-m
Causes asrcdep not to report missing files.
-g
Causes asrcdep to ignore dependencies from non-generic units containing generic units. It does not affect dependencies caused by generic units.
-i
Causes asrcdep to ignore dependencies caused by pragma INLINE.
-F
Causes asrcdep to do a "fast" analysis, which has the following differences from its regular analysis:
  • Only the first unit in any file is processed.
  • If there is more than one unit in a file, this fact is not detected and asrcdep processes only the first one. This means, for example, that units can be reported as missing even if they do exist in one of the files.
  • Pragma INLINE will not be detected, so the -i option is considered to be in effect even though you cannot explicitly provide it.
  • Generic units inside non-generic units will not be detected, so the -g option is considered to be in effect even though you cannot explicitly provide it.
  • Some syntax errors are not detected, since only part of the first unit is analyzed.
-u UnitName
Indicates that dependency information need only be generated for the given unit. The unit name may start with lib/ or sec/; if it does not, dependency information is generated for both the specification and body of the given unit if both are present in the source files.
-c
Causes asrcdep to continue despite the following errors:
  • Syntax errors in source
  • Non-existent files
  • Other errors.
Each error is reported to standard error. The final return does not reflect any of the errors, and asrcdep processes as much of each file as it can. The resulting compilation list can be incomplete or errors (such as missing unit) can be reported as a result of other errors (such as syntax errors).
-I
Specifies that a list of files names will be read from standard input.
If "--" is found in a line read from standard input, the rest of the line is ignored.

PARAMETERS

FileName . . .
Specifies one or more Ada source files to analyze. Specify "-" as one of the file names to read Ada source from standard input.

NOTES

  1. The order takes into account the need to have generic bodies compiled before the associated generic is instantiated.

  2. Some kinds of dependencies are difficult to determine through source analysis alone. "Unit Dependencies Created by Inlining" in Chapter 9 gives more information about dependencies introduced by inline expansion.

    The asrcdep command may generate some dependencies that do not really occur. If a package includes a context clause naming another package that declares generic units or subprograms with pragma INLINE applied, but does not instantiate the generics or call the subprograms, asrcdep may report that there are circular dependencies, even when a correct compilation order exists. If you know that a correct compilation order exists, use the options -i and/or -g to make asrcdep ignore the unnecessary body dependencies.

  3. No dependencies are generated for units defined by the language standard, for example TEXT_IO or CALENDAR. The asrcdep command does not report any error when the source for these units is not present in the specified source files.

RETURN CODES

Below is a list of the possible values returned by asrcdep. Refer to Return Codes for Commands for details about the meaning of these return s.

0, 1, 2, 4, 7, 8, 9, 13, 99

FILES

$POWERADA/bin/asrcdep

the asrcdep program image

ENVIRONMENT VARIABLES

POWERADA
This must be defined and indicate the powerada/ada95 directory in the PowerAda installation.

SEE ALSO

abuild.

BUGS/LIMITATIONS

See Problems and Questions at the beginning of this Appendix.