PowerAda aextract

From OC Systems Wiki!
Jump to: navigation, search


NAME

aextract - extracts PowerAda source

SYNOPSIS

aextract [-hFIU] [-L Library | -s Sublibrary | -x Executable ]
         [units...]

DESCRIPTION

aextract extracts the ASCII source text for a compilation unit from an Ada library or sublibrary.

Source is saved in the library by the ada compiler by default. Source is not stored in the library if the -P command line option is specified.

As with other PowerAda tools, the specification or body of the unit is specified using "lib/unitname" or "sec/unitname", respectively.

The library in which to search for the unit is designated by specifying the library file (e.g., -L alib.list), or an executable file from which to extract the library (e.g,. -x a.out). One may instead search a specific sublibrary as well (e.g., -s adalib).

By default, the source text is written to standard output. The -F flag indicates that the source text is to be written to a local file which is the same as the basename of the file from which the unit was originally compiled. The -U flag indicates that the source text is to be written to a local file whose name is based on the unitname.

WARNING: There is no checking to see if this file created already exists, and files may be overwritten. If the -I flag is specified, unit names are read from standard input.

OPTIONS

-F
Writes output to base filename from which unit was compiled.
-h
Gives this help.
-I
Reads units from standard input.
-U
Writes output to filename based on unitname.
-L Library
Specifies library to get units from.
-s Sublibrary
Specifies sublibrary to get units from.
'-x Executable
Specifies PowerAda executable to get library from.'

PARAMETERS

units...
Specifies units to get source for.

FILES

$POWERADA/bin/aextract - the aextract program

ENVIRONMENT VARIABLES

POWERADA
This must be defined and indicate the powerada/ada95 directory in the PowerAda installation.
POWERADA_BASELINES
Names a baselines file identifying aliases for baseline projects.

EXAMPLES

cat > h.ada << EOF
with text_io;
procedure hello is 
begin
   text_io.put_line("Hello World");
end hello;
EOF
alibinit
ada h.ada
aextract sec/hello > xh.ada
diff h.ada xh.ada
areport -B | aextract -IU
diff hello.ada hello_.ada
rm h.ada
aextract -F sec/hello 
diff h.ada xh.ada

SEE ALSO

areport, ada, powerada