PowerAda aunitcp

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


NAME

aunitcp - copy a unit

SYNOPSIS

aunitcp [-hf] SourceSublibrary TargetSublibrary
        { -I | Name ... }

DESCRIPTION

Copy one or more units from one sublibrary to another sublibrary.

OPTIONS

-h
Requests help for the command. If specified, all other options and parameters (except possibly erroneous ones) are ignored.
-f
Indicates that the names specified are source file names, not compilation unit names. All the units associated with each of the source files will be copied.
You can specify a source file name either with or without a full directory path. However a sublibrary can contain compilation units from different files with the same base name; you might have some units in the file /u/smith/the_file.ada and other units in the file /u/jones/the_file.ada. If you use the -f option to copy all units associated with the source file the_file.ada, the aunitcp command returns an error. In such a case specify the full path name for the source file.
-I
Specifies that a list of names will be read from standard input. If the -f option is also specified, the names are interpreted as file names. Otherwise the names are interpreted as compilation unit names.
If "--" is found in a line read from standard input, the remainder of the line is ignored.
This option can appear anywhere on the command line; if you use it you cannot also specify a file name as the last command-line parameter.

PARAMETERS

SourceSublibrary
Specifies the name of the sublibrary from which the unit is to be copied. If it is not in the current directory, specify its name as either a relative or absolute path name.
TargetSublibrary
Specifies the name of the sublibrary to which the unit is to be copied. If it is not in the current directory, specify its name as either a relative or absolute path name.
Name . . .
Specifies the names of the compilation units or source files that will be used in this copy operation.
If the -f option is specified, the name parameter refers to a source file name containing the units to be copied.
If the -f option is not specified, the name parameter refers to an Ada compilation unit to be copied. Each unit name must be prefixed with either lib/ or sec/.

RESTRICTIONS

If the source file that contains a compilation unit contains other units as well, you cannot copy just one of the units to another sublibrary. Use the -f option, specifying the file name, to copy all the units contained in the file.

This restriction does not apply to a source file containing the specification and body of a compilation unit. Both specification and body are copied at the same time by the aunitcp command.

When you copy a compilation unit from one sublibrary to another, the target sublibrary must not already contain a compilation unit with the same name as the one being copied or the copy operation will fail.

When you use the -f option to copy compilation units, the source file specified can contain a set of compilation units. The target sublibrary must not already contain a compilation unit with the same name as any unit in this set or the copy operation will fail.

FILES

$POWERADA/bin/aunitcp

the aunitcp program image

RETURN CODES

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

0, 1, 2, 3, 4, 5, 10, 16, 99

ENVIRONMENT VARIABLES

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

BUGS/LIMITATIONS

See Problems and Questions at the beginning of this Appendix.