PowerAda Setting up a User Account to Use Ada

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


Before using any PowerAda tools, you must ensure that the POWERADA environment variable is defined to point to the ada95 subdirectory of the PowerAda installation directory if you are running AIX, the linux subdirectory if you are running Linux on the Intel architecture, or the linuxppc subdirectory if you are running Linux on the PowerPC architecture.

PowerAda can be used under any of the shell programs provided with AIX or Linux, the Bourne shell (/bin/bsh), the C shell (/bin/csh), and the Korn shell (/bin/ksh), as well as GNU bash and probably others. The Korn shell (POSIX shell) is the default shell interpreter. Check with your system administrator if you are unsure which shell you are using.

To see if POWERADA is defined, enter the command:

echo $POWERADA

The PowerAda tools located in the directory $POWERADA/bin. If this directory is not part of the path, the full pathname to the tool must be explicitly specified, or you may add it to your path. The following examples show how this would be done if PowerAda were installed under /usr/lpp. Note that this is not a requirement--the actual powerada directory may be installed anywhere on your machine. Check with your system administrator.

Scripts are provided to simplify the definition of the PowerAda environment. The installation process modifies these to indicate the full pathname of the PowerAda installation directory, and site administrators may wish to add other environment definitions ( See Chapter 5, "Setup File"), but after this initial customization you should simply have to do the following:

For Bourne, Bash, or Korn shells:

. /usr/lpp/powerada/setup

For the C-shell:

source /usr/lpp/powerada/setup.csh

Be sure to use the leading . or source commands so that the actions of the script apply to your current shell.

As delivered, these setup scripts define PowerAda to be in Ada95 mode. You can include the invocation of the setup script in your shell initialization file. This file is located in your home directory, and is named .profile if you use the Bourne shell or the Korn shell, and .login if you use the C shell.

If you find yourself without these scripts, or the setup script does not correctly designate the PowerAda installation directory, all you really need to do is the following. (Remember that /usr/lpp is just being used as an example--your installation may be anywhere.)

in Korn shell, Bourne shell, or bash:

POWERADA=/usr/lpp/powerada/ada95
export POWERADA
PATH=$POWERADA/bin:$PATH
. $POWERADA/tools/bin/setup_mode95

in C shell:

setenv POWERADA=/usr/lpp/powerada/ada95
set path=($POWERADA/bin $path)
source $POWERADA/tools/bin/setup_mode95.csh

Linux (Intel) users would use:

in Korn shell, Bourne shell, or bash:

POWERADA=/usr/lpp/powerada/linux
export POWERADA
PATH=$POWERADA/bin:$PATH
. $POWERADA/tools/bin/setup_modelinux

in C shell:

setenv POWERADA=/usr/lpp/powerada/linux
set path=($POWERADA/bin $path)
source $POWERADA/tools/bin/setup_modelinux.csh

Linux (PowerPC) users would use:

in Korn shell, Bourne shell, or bash:

POWERADA=/usr/lpp/powerada/linuxppc
export POWERADA
PATH=$POWERADA/bin:$PATH
. $POWERADA/tools/bin/setup_modelinuxppc

in C shell:

setenv POWERADA=/usr/lpp/powerada/linuxppc
set path=($POWERADA/bin $path)
source $POWERADA/tools/bin/setup_modelinuxppc.csh